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

Commit 5e7e515c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix VTS BatchingOperation Test." into sc-dev

parents a92b4b71 92912b63
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -425,7 +425,10 @@ class SensorsHidlTestBase : public testing::TestWithParam<std::string> {
            return;
        }

        batchingPeriodInNs = std::min(batchingPeriodInNs, maxBatchingTestTimeNs);
        if (batchingPeriodInNs > maxBatchingTestTimeNs) {
            batchingPeriodInNs = maxBatchingTestTimeNs;
            minFifoCount = (uint32_t)(batchingPeriodInNs / minSamplingPeriodInNs);
        }

        ALOGI("Test batching for %d ms", (int)(batchingPeriodInNs / 1000 / 1000));

@@ -448,7 +451,7 @@ class SensorsHidlTestBase : public testing::TestWithParam<std::string> {
                      false /*change collection*/);

        // 0.8 + 0.2 times the batching period
        usleep(batchingPeriodInNs / 1000 * 8 / 10);
        usleep(batchingPeriodInNs / 1000 * 2 / 10);
        ASSERT_EQ(flush(handle), Result::OK);

        // plus some time for the event to deliver