Reland "Increase the test timeout used when waiting for events to be traced"
This reverts commit aff0a04702df8f66dddf022cbefdec24ac7138a5.
Reason for revert: b/323347575, b/210460522
Change-Id: I8f0b2a246dd25f6449e311411cd4d1b698706e88
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);