diff options
author | Lang Hames <lhames@gmail.com> | 2019-09-06 21:55:43 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2019-09-06 21:55:43 +0000 |
commit | 88cddb7a1c1700b9c57e58e08a24f76bc4dd1d4b (patch) | |
tree | 4a47943ec1cb7aaf9ef64a219f5f4275f2a682d6 /llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp | |
parent | 7a7bba289521e6d4da199565cf72dc9eaed3d671 (diff) | |
download | bcm5719-llvm-88cddb7a1c1700b9c57e58e08a24f76bc4dd1d4b.tar.gz bcm5719-llvm-88cddb7a1c1700b9c57e58e08a24f76bc4dd1d4b.zip |
[ORC][RPC] Join server thread before checking condition in unit test.
Otherwise we have a race on the sent-messages count.
llvm-svn: 371263
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp index 8e4c5330d90..2a0ed077252 100644 --- a/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp @@ -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) { |