mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 10:44:41 +00:00
Increase timeout values for callback
We need to increase the timeout values for waiting for the callback to be called. Bug: 184719072 Test: atest to verify that the affected tests pass on P21 Change-Id: I5a5b2ae1fb99f98e3d94cd956685fabc45b89b30
This commit is contained in:
@@ -276,7 +276,9 @@ TEST_P(VibratorAidl, ValidateEffectWithCallback) {
|
||||
if (!status.isOk())
|
||||
continue;
|
||||
|
||||
std::chrono::milliseconds timeout{lengthMs * 2};
|
||||
//TODO(b/187207798): revert back to conservative timeout values once
|
||||
//latencies have been fixed
|
||||
std::chrono::milliseconds timeout{lengthMs * 8};
|
||||
EXPECT_EQ(completionFuture.wait_for(timeout), std::future_status::ready);
|
||||
}
|
||||
}
|
||||
@@ -588,7 +590,9 @@ TEST_P(VibratorAidl, ComposeCallback) {
|
||||
EXPECT_EQ(Status::EX_NONE, vibrator->compose(composite, callback).exceptionCode())
|
||||
<< toString(primitive);
|
||||
|
||||
EXPECT_EQ(completionFuture.wait_for(duration * 2), std::future_status::ready)
|
||||
//TODO(b/187207798): revert back to conservative timeout values once
|
||||
//latencies have been fixed
|
||||
EXPECT_EQ(completionFuture.wait_for(duration * 4), std::future_status::ready)
|
||||
<< toString(primitive);
|
||||
end = high_resolution_clock::now();
|
||||
|
||||
@@ -739,7 +743,9 @@ TEST_P(VibratorAidl, ComposeValidPwleWithCallback) {
|
||||
sp<CompletionCallback> callback =
|
||||
new CompletionCallback([&completionPromise] { completionPromise.set_value(); });
|
||||
uint32_t durationMs = 2100; // Sum of 2 active and 1 braking below
|
||||
std::chrono::milliseconds timeout{durationMs * 2};
|
||||
//TODO(b/187207798): revert back to conservative timeout values once
|
||||
//latencies have been fixed
|
||||
std::chrono::milliseconds timeout{durationMs * 4};
|
||||
|
||||
ActivePwle active = composeValidActivePwle(vibrator, capabilities);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user