Increase the test timeout used when waiting for events to be traced

We need to use a larger timeout while waiting for events to be traced,
compared to the timeout used while waiting to receive events through the
input channel. Since events are traced from a separate thread that
doesn't have as high of a thread priority as the InputDispatcher's
thread, the tracer is expected to lag behind the dispatcher.

Bug: 323347575
Bug: 210460522
Test: inputflinger_tests --gtest_filter="*InputDisp*" --gtest_repeat=100 --gtest_break_on_failure
Change-Id: I7dfe648c4de5ef39f7c44ad81b544634a54e0e68
diff --git a/services/inputflinger/tests/FakeInputTracingBackend.cpp b/services/inputflinger/tests/FakeInputTracingBackend.cpp
index 77d35fb..1d27107 100644
--- a/services/inputflinger/tests/FakeInputTracingBackend.cpp
+++ b/services/inputflinger/tests/FakeInputTracingBackend.cpp
@@ -23,7 +23,11 @@
 
 namespace {
 
-constexpr auto TRACE_TIMEOUT = std::chrono::milliseconds(100);
+// Use a larger timeout while waiting for events to be traced, compared to the timeout used while
+// waiting to receive events through the input channel. Events are traced from a separate thread,
+// which does not have the same high thread priority as the InputDispatcher's thread, so the tracer
+// is expected to lag behind the Dispatcher at times.
+constexpr auto TRACE_TIMEOUT = std::chrono::seconds(5);
 
 base::ResultError<> error(const std::ostringstream& ss) {
     return base::ResultError(ss.str(), BAD_VALUE);