File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/cryptography/tests/Signing Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,8 @@ public function test_time_protection(): void
176176 $ this ->assertTrue ($ signer ->verify ($ data , $ signature ));
177177 $ elapsed = microtime (true ) - $ start ;
178178
179- $ this ->assertGreaterThanOrEqual (0.3 , $ elapsed );
179+ $ this ->assertGreaterThanOrEqual (0.29 , $ elapsed );
180+ $ this ->assertLessThanOrEqual (0.311 , $ elapsed );
180181 }
181182
182183 public function test_time_protection_with_mock_clock (): void
@@ -194,6 +195,7 @@ public function test_time_protection_with_mock_clock(): void
194195 $ this ->assertTrue ($ signer ->verify ($ data , $ signature ));
195196 $ elapsed = $ clock ->timestamp ()->getMilliseconds () - $ ms ;
196197
197- $ this ->assertSame (1_000 , $ elapsed );
198+ $ this ->assertLessThanOrEqual (1_001 , $ elapsed );
199+ $ this ->assertGreaterThanOrEqual (999 , $ elapsed );
198200 }
199201}
You can’t perform that action at this time.
0 commit comments