Skip to content

Commit

Permalink
Changed async timer tests to round up to the nearest millisecond.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilge committed Feb 26, 2019
1 parent e5bab5d commit c62169e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/Unit/AsyncExponentialBackoffExceptionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public function test()
}
});

self::assertGreaterThan($start + 1.5, microtime(true));
self::assertGreaterThan($start + 1.499, microtime(true));
}
}
4 changes: 2 additions & 2 deletions test/Unit/AsyncMilliSleepExceptionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function testValue()
yield $handler();
});

self::assertGreaterThan($start + 1, microtime(true));
self::assertGreaterThan($start + .999, microtime(true));
}

public function testSeries()
Expand All @@ -38,6 +38,6 @@ public function testSeries()
}
});

self::assertGreaterThan($start + 1, microtime(true));
self::assertGreaterThan($start + .999, microtime(true));
}
}

0 comments on commit c62169e

Please sign in to comment.