summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-08-11 11:23:16 -0700
committerYabin Cui <yabinc@google.com>2015-08-11 11:25:02 -0700
commitbf572d91b50f818a7c3e29340cccf1931939ff8b (patch)
treeaa668ecfa9218ebab90440531b846024cd6b679c
parent0f455612d3325932a851418634a17a61307948c5 (diff)
downloadbionic-bf572d91b50f818a7c3e29340cccf1931939ff8b.zip
bionic-bf572d91b50f818a7c3e29340cccf1931939ff8b.tar.gz
bionic-bf572d91b50f818a7c3e29340cccf1931939ff8b.tar.bz2
Fix flaky test time.timer_settime_0.
It fixes the problem reported in https://code.google.com/p/android/issues/detail?id=182395. Change-Id: Ie16aa04095dac08a62dd0d4c50e763b36526624c
-rw-r--r--tests/time_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/time_test.cpp b/tests/time_test.cpp
index 42c20d3..0971de2 100644
--- a/tests/time_test.cpp
+++ b/tests/time_test.cpp
@@ -271,8 +271,8 @@ TEST(time, timer_settime_0) {
Counter counter(Counter::CountAndDisarmNotifyFunction);
ASSERT_EQ(0, counter.Value());
- counter.SetTime(0, 1, 1, 0);
- usleep(500000);
+ counter.SetTime(0, 500000000, 1, 0);
+ sleep(1);
// The count should just be 1 because we disarmed the timer the first time it fired.
ASSERT_EQ(1, counter.Value());