Skip to content

Commit 97fb24e

Browse files
GDTCORClockTest: decrease expected timestamp accuracy to fix test flakes (#6330)
1 parent 5d27fe8 commit 97fb24e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GoogleDataTransport/GDTCORTests/Unit/GDTCORClockTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ - (void)testUptime {
9090
XCTAssertGreaterThan(clock2.uptimeNanoseconds, clock1.uptimeNanoseconds);
9191
NSTimeInterval uptimeDiff =
9292
(clock2.uptimeNanoseconds - clock1.uptimeNanoseconds) / (double)NSEC_PER_SEC;
93-
NSTimeInterval accuracy = 0.1;
93+
NSTimeInterval accuracy = 0.2;
9494

9595
// Assert that uptime difference reflects the actually passed time.
9696
XCTAssertLessThanOrEqual(ABS(uptimeDiff - timeDiff), accuracy);
@@ -107,7 +107,7 @@ - (void)testUptimeMilliseconds {
107107
NSTimeInterval millisecondsPerSecond = 1000;
108108
NSTimeInterval uptimeDiff =
109109
([clock2 uptimeMilliseconds] - [clock1 uptimeMilliseconds]) / millisecondsPerSecond;
110-
NSTimeInterval accuracy = 0.1;
110+
NSTimeInterval accuracy = 0.2;
111111

112112
// Assert that uptime difference reflects the actually passed time.
113113
XCTAssertLessThanOrEqual(ABS(uptimeDiff - timeDiff), accuracy);

0 commit comments

Comments
 (0)