OSDN Git Service

Fix test_set_zero_periodic unit test failure
authorPavlin Radoslavov <pavlin@google.com>
Mon, 2 May 2016 22:53:22 +0000 (15:53 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Mon, 2 May 2016 22:59:56 +0000 (15:59 -0700)
Removed an "EXPECT_EQ(cb_counter, 0)" statement
right after a timer of value 0 is scheduled.
The EXPECT_EQ statement shouldn't be there,
because by the time it is reached, the callback might
have been called already.

Change-Id: I61fbec96c436787321c6b36006a2bc1c0e627667

osi/test/alarm_test.cpp

index 8d72776..954468c 100644 (file)
@@ -145,7 +145,6 @@ TEST_F(AlarmTest, test_set_zero_periodic) {
 
   alarm_set(alarm, 0, cb, NULL);
 
-  EXPECT_EQ(cb_counter, 0);
   EXPECT_TRUE(WakeLockHeld());
 
   for (int i = 1; i <= 10; i++) {