mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-25 20:13:23 +03:00
Fixed sleep timing on IPC log rate limit unit tests #4624
Still a little hacky, but seems stable on my dev machine
This commit is contained in:
parent
efa358f917
commit
2cce60f672
@ -77,7 +77,7 @@ TEST(IpcLogOutputterTests, write_bufferRateLimit)
|
||||
EXPECT_CALL(mockServer, send(IpcLogLineMessageEq("mock 3\n"), _)).Times(1);
|
||||
|
||||
IpcLogOutputter outputter(mockServer);
|
||||
outputter.bufferRateLimit(1, 0.01); // 5ms
|
||||
outputter.bufferRateLimit(1, 0.001); // 1ms
|
||||
|
||||
// log 1 more line than the buffer can accept in time limit.
|
||||
outputter.write(kNOTE, "mock 1");
|
||||
@ -86,8 +86,9 @@ TEST(IpcLogOutputterTests, write_bufferRateLimit)
|
||||
|
||||
// after waiting the time limit send another to make sure
|
||||
// we can log after the time limit passes.
|
||||
ARCH->sleep(0.001); // 10ms
|
||||
ARCH->sleep(0.01); // 10ms
|
||||
outputter.write(kNOTE, "mock 3");
|
||||
outputter.write(kNOTE, "mock 4");
|
||||
outputter.waitForEmpty();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user