Skip to content

Commit a2d3cf1

Browse files
committed
Reland "Increase the test timeout used when waiting for events to be traced"
This reverts commit aff0a04. Reason for revert: b/323347575, b/210460522 Change-Id: I8f0b2a246dd25f6449e311411cd4d1b698706e88
1 parent 0eaf140 commit a2d3cf1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

services/inputflinger/tests/FakeInputTracingBackend.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ namespace android::inputdispatcher {
2323

2424
namespace {
2525

26-
constexpr auto TRACE_TIMEOUT = std::chrono::milliseconds(100);
26+
// Use a larger timeout while waiting for events to be traced, compared to the timeout used while
27+
// waiting to receive events through the input channel. Events are traced from a separate thread,
28+
// which does not have the same high thread priority as the InputDispatcher's thread, so the tracer
29+
// is expected to lag behind the Dispatcher at times.
30+
constexpr auto TRACE_TIMEOUT = std::chrono::seconds(5);
2731

2832
base::ResultError<> error(const std::ostringstream& ss) {
2933
return base::ResultError(ss.str(), BAD_VALUE);

0 commit comments

Comments
 (0)