test: assert on >= 5 rather than strictly ==

due to process scheduling, we may even receive job_completed
messages before the test continues. The assert only needs to
check that there are enough messages to prevent invalid indexing.
This fixes a flakey test.
pull/167/head
Oliver Giles 2 years ago
parent 48c0e9340e
commit 261c08d2fe

@ -178,7 +178,7 @@ TEST_F(LaminarFixture, QueueFront) {
ioContext->waitScope.poll();
setNumExecutors(2);
ioContext->waitScope.poll();
ASSERT_EQ(5, es->messages().size());
ASSERT_GE(es->messages().size(), 5);
auto started1 = es->messages().at(3).GetObject();
EXPECT_STREQ("job_started", started1["type"].GetString());
EXPECT_STREQ("bar", started1["data"]["name"].GetString());

Loading…
Cancel
Save