From 2cce60f67281f51944cbb7a7f916ba847d79a6a2 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Tue, 19 May 2015 10:41:04 +0100 Subject: [PATCH] Fixed sleep timing on IPC log rate limit unit tests #4624 Still a little hacky, but seems stable on my dev machine --- src/test/unittests/ipc/IpcLogOutputterTests.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/unittests/ipc/IpcLogOutputterTests.cpp b/src/test/unittests/ipc/IpcLogOutputterTests.cpp index e265c8a2..18f1eb21 100644 --- a/src/test/unittests/ipc/IpcLogOutputterTests.cpp +++ b/src/test/unittests/ipc/IpcLogOutputterTests.cpp @@ -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(); }