[ORC][RPC] Join server thread before checking condition in unit test.

Otherwise we have a race on the sent-messages count.

llvm-svn: 371263
This commit is contained in:
Lang Hames 2019-09-06 21:55:43 +00:00
parent 7a7bba2895
commit 88cddb7a1c
1 changed files with 2 additions and 2 deletions

View File

@ -214,6 +214,8 @@ TEST(DummyRPC, TestCallAsyncVoidBool) {
EXPECT_FALSE(!!Err) << "Client failed to handle response from void(bool)";
}
ServerThread.join();
// The client should have made two calls to send: One implicit call to
// negotiate the VoidBool function key, and a second to make the VoidBool
// call.
@ -224,8 +226,6 @@ TEST(DummyRPC, TestCallAsyncVoidBool) {
// the negotiate call, and another to send the response to the VoidBool call.
EXPECT_EQ(Channels.second->SendCalls, 2U)
<< "Expected two send calls to have been made by server";
ServerThread.join();
}
TEST(DummyRPC, TestCallAsyncIntInt) {