Sync fake clock for nonce tests
Because the fake clock is getting out of sync with the real clock for the nonce flood tests, add a call to TestSleep::SyncFakeClock() in Clock::GetCurrentTime() to force a sync. Bug: 198329759
This commit is contained in:
committed by
Fred Gylys-Colwell
parent
3def45f33d
commit
8c158b00cf
@@ -35,6 +35,7 @@ FakeClock* g_fake_clock = nullptr;
|
||||
|
||||
// On devices running a fake OEMCrypto, we can use a fake sleep and fake time.
|
||||
int64_t Clock::GetCurrentTime() {
|
||||
wvcdm::TestSleep::SyncFakeClock();
|
||||
if (g_fake_clock == nullptr) g_fake_clock = new FakeClock();
|
||||
return g_fake_clock->now() / 1000;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user