mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-23 20:31:47 +08:00
Changed note to notify #4745
This commit is contained in:
@@ -57,9 +57,9 @@ TEST(IpcLogOutputterTests, write_threadingEnabled_bufferIsSent)
|
||||
EXPECT_CALL(mockServer, send(IpcLogLineMessageEq("mock 2\n"), _)).Times(1);
|
||||
|
||||
IpcLogOutputter outputter(mockServer, true);
|
||||
outputter.write(kNOTE, "mock 1");
|
||||
outputter.write(kNOTIFY, "mock 1");
|
||||
mockServer.waitForSend();
|
||||
outputter.write(kNOTE, "mock 2");
|
||||
outputter.write(kNOTIFY, "mock 2");
|
||||
mockServer.waitForSend();
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@ TEST(IpcLogOutputterTests, write_overBufferMaxSize_firstLineTruncated)
|
||||
outputter.bufferMaxSize(2);
|
||||
|
||||
// log more lines than the buffer can contain
|
||||
outputter.write(kNOTE, "mock 1");
|
||||
outputter.write(kNOTE, "mock 2");
|
||||
outputter.write(kNOTE, "mock 3");
|
||||
outputter.write(kNOTIFY, "mock 1");
|
||||
outputter.write(kNOTIFY, "mock 2");
|
||||
outputter.write(kNOTIFY, "mock 3");
|
||||
outputter.sendBuffer();
|
||||
}
|
||||
|
||||
@@ -95,8 +95,8 @@ TEST(IpcLogOutputterTests, write_underBufferMaxSize_allLinesAreSent)
|
||||
outputter.bufferMaxSize(2);
|
||||
|
||||
// log more lines than the buffer can contain
|
||||
outputter.write(kNOTE, "mock 1");
|
||||
outputter.write(kNOTE, "mock 2");
|
||||
outputter.write(kNOTIFY, "mock 1");
|
||||
outputter.write(kNOTIFY, "mock 2");
|
||||
outputter.sendBuffer();
|
||||
}
|
||||
|
||||
@@ -114,8 +114,8 @@ TEST(IpcLogOutputterTests, write_overBufferRateLimit_lastLineTruncated)
|
||||
outputter.bufferRateLimit(1, 0.001); // 1ms
|
||||
|
||||
// log 1 more line than the buffer can accept in time limit.
|
||||
outputter.write(kNOTE, "mock 1");
|
||||
outputter.write(kNOTE, "mock 2");
|
||||
outputter.write(kNOTIFY, "mock 1");
|
||||
outputter.write(kNOTIFY, "mock 2");
|
||||
outputter.sendBuffer();
|
||||
|
||||
// after waiting the time limit send another to make sure
|
||||
@@ -123,8 +123,8 @@ TEST(IpcLogOutputterTests, write_overBufferRateLimit_lastLineTruncated)
|
||||
// HACK: sleep causes the unit test to fail intermittently,
|
||||
// so lets try 100ms (there must be a better way to solve this)
|
||||
ARCH->sleep(0.1); // 100ms
|
||||
outputter.write(kNOTE, "mock 3");
|
||||
outputter.write(kNOTE, "mock 4");
|
||||
outputter.write(kNOTIFY, "mock 3");
|
||||
outputter.write(kNOTIFY, "mock 4");
|
||||
outputter.sendBuffer();
|
||||
}
|
||||
|
||||
@@ -142,14 +142,14 @@ TEST(IpcLogOutputterTests, write_underBufferRateLimit_allLinesAreSent)
|
||||
outputter.bufferRateLimit(4, 1); // 1s (should be plenty of time)
|
||||
|
||||
// log 1 more line than the buffer can accept in time limit.
|
||||
outputter.write(kNOTE, "mock 1");
|
||||
outputter.write(kNOTE, "mock 2");
|
||||
outputter.write(kNOTIFY, "mock 1");
|
||||
outputter.write(kNOTIFY, "mock 2");
|
||||
outputter.sendBuffer();
|
||||
|
||||
// after waiting the time limit send another to make sure
|
||||
// we can log after the time limit passes.
|
||||
outputter.write(kNOTE, "mock 3");
|
||||
outputter.write(kNOTE, "mock 4");
|
||||
outputter.write(kNOTIFY, "mock 3");
|
||||
outputter.write(kNOTIFY, "mock 4");
|
||||
outputter.sendBuffer();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user