Skip to content

Commit 88cddb7

Browse files
committed
[ORC][RPC] Join server thread before checking condition in unit test.
Otherwise we have a race on the sent-messages count. llvm-svn: 371263
1 parent 7a7bba2 commit 88cddb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ TEST(DummyRPC, TestCallAsyncVoidBool) {
214214
EXPECT_FALSE(!!Err) << "Client failed to handle response from void(bool)";
215215
}
216216

217+
ServerThread.join();
218+
217219
// The client should have made two calls to send: One implicit call to
218220
// negotiate the VoidBool function key, and a second to make the VoidBool
219221
// call.
@@ -224,8 +226,6 @@ TEST(DummyRPC, TestCallAsyncVoidBool) {
224226
// the negotiate call, and another to send the response to the VoidBool call.
225227
EXPECT_EQ(Channels.second->SendCalls, 2U)
226228
<< "Expected two send calls to have been made by server";
227-
228-
ServerThread.join();
229229
}
230230

231231
TEST(DummyRPC, TestCallAsyncIntInt) {

0 commit comments

Comments
 (0)