Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 792c6c4c authored by Vince Leung's avatar Vince Leung Committed by Automerger Merge Worker
Browse files

Merge "Increase timeout values for callback" into sc-dev am: df1b8256

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/14430500

Change-Id: I7eab14692bdd132796d38f33116e9547bacccb15
parents e30399e2 df1b8256
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -276,7 +276,9 @@ TEST_P(VibratorAidl, ValidateEffectWithCallback) {
            if (!status.isOk())
            if (!status.isOk())
                continue;
                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);
            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())
            EXPECT_EQ(Status::EX_NONE, vibrator->compose(composite, callback).exceptionCode())
                << toString(primitive);
                << 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);
                << toString(primitive);
            end = high_resolution_clock::now();
            end = high_resolution_clock::now();


@@ -739,7 +743,9 @@ TEST_P(VibratorAidl, ComposeValidPwleWithCallback) {
    sp<CompletionCallback> callback =
    sp<CompletionCallback> callback =
        new CompletionCallback([&completionPromise] { completionPromise.set_value(); });
        new CompletionCallback([&completionPromise] { completionPromise.set_value(); });
    uint32_t durationMs = 2100;  // Sum of 2 active and 1 braking below
    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);
    ActivePwle active = composeValidActivePwle(vibrator, capabilities);