fix potentional false positive tests due to timing submit/tizen/20200917.073536
authorWonki Kim <wonki_.kim@samsung.com>
Wed, 16 Sep 2020 09:04:02 +0000 (18:04 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Wed, 16 Sep 2020 09:04:02 +0000 (18:04 +0900)
few tests could be failed due to timing.
this patch fixes them.

Change-Id: I8c2c8c7734ed03569044f61121cfc1bcc8c36581

tests/Test_UiDevice.cc

index a015fb518b532b8aa3a7f492a144bb792fcc1524..5a5905b5a97a46747c19787844acb0d0d9c92377 100644 (file)
@@ -154,7 +154,6 @@ TEST_F(AurumTestUiDevice, wheelUp_P1)
     clock_gettime(CLOCK_MONOTONIC, &t1);
     UiDevice::getInstance()->wheelUp(123, 500);
     clock_gettime(CLOCK_MONOTONIC, &t2);
-    ASSERT_LT((double)(t2.tv_sec) + (double)(t2.tv_nsec/1000000000.0)  - (double)(t1.tv_sec) - (double)(t1.tv_nsec/1000000000.0), (0.5+0.167)*1.1);
     ASSERT_EQ(mDevice->mWheelDevice, 123);
 }
 
@@ -164,7 +163,6 @@ TEST_F(AurumTestUiDevice, wheelDown_P1)
     clock_gettime(CLOCK_MONOTONIC, &t1);
     UiDevice::getInstance()->wheelDown(123, 500);
     clock_gettime(CLOCK_MONOTONIC, &t2);
-    ASSERT_LT((double)(t2.tv_sec) + (double)(t2.tv_nsec/1000000000.0)  - (double)(t1.tv_sec) - (double)(t1.tv_nsec/1000000000.0), (0.5+0.167)*1.1);
     ASSERT_EQ(mDevice->mWheelDevice, -123);
 }
 
@@ -315,9 +313,9 @@ TEST_F(AurumTestUiDevice, getSystemTime_P1)
     long long t1 = UiDevice::getInstance()->getSystemTime(TimeRequestType::MONOTONIC);
     clock_gettime(CLOCK_MONOTONIC, &t);
     long long t2 = (long long)t.tv_sec * 1000L + (long long)(t.tv_nsec / 1000000);
-    ASSERT_NEAR(t1,t2,10);
+    ASSERT_NEAR(t1,t2,100);
     long long t3 = UiDevice::getInstance()->getSystemTime(TimeRequestType::WALLCLOCK);
     clock_gettime(CLOCK_REALTIME, &t);
     long long t4 = (long long)t.tv_sec * 1000L + (long long)(t.tv_nsec / 1000000);
-    ASSERT_NEAR(t3,t4,10);
+    ASSERT_NEAR(t3,t4,100);
 }
\ No newline at end of file