summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-06-19 18:40:59 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-19 18:40:59 +0000
commitb245bc750021ce6d220e71625fca66620cdd1f05 (patch)
treee7d85467751d4fd93f079400667312687f0038d1
parent64e9e71cdb7d88397e510e1986d494b797ed3b45 (diff)
parent0f455612d3325932a851418634a17a61307948c5 (diff)
downloadbionic-b245bc750021ce6d220e71625fca66620cdd1f05.zip
bionic-b245bc750021ce6d220e71625fca66620cdd1f05.tar.gz
bionic-b245bc750021ce6d220e71625fca66620cdd1f05.tar.bz2
am 0f455612: Merge "Fix flaky test of timer_create_multiple in L." into lollipop-mr1-cts-dev
* commit '0f455612d3325932a851418634a17a61307948c5': Fix flaky test of timer_create_multiple in L.
-rw-r--r--tests/time_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/time_test.cpp b/tests/time_test.cpp
index 97e371c..42c20d3 100644
--- a/tests/time_test.cpp
+++ b/tests/time_test.cpp
@@ -140,7 +140,7 @@ void SetTime(timer_t t, time_t value_s, time_t value_ns, time_t interval_s, time
ts.it_value.tv_nsec = value_ns;
ts.it_interval.tv_sec = interval_s;
ts.it_interval.tv_nsec = interval_ns;
- ASSERT_EQ(0, timer_settime(t, TIMER_ABSTIME, &ts, NULL));
+ ASSERT_EQ(0, timer_settime(t, 0, &ts, NULL));
}
static void NoOpNotifyFunction(sigval_t) {
@@ -356,8 +356,8 @@ TEST(time, timer_create_multiple) {
ASSERT_EQ(0, counter2.Value());
ASSERT_EQ(0, counter3.Value());
- counter2.SetTime(0, 1, 0, 0);
- usleep(500000);
+ counter2.SetTime(0, 500000000, 0, 0);
+ sleep(1);
EXPECT_EQ(0, counter1.Value());
EXPECT_EQ(1, counter2.Value());