diff options
author | JackLivio <jack@livio.io> | 2018-10-19 15:05:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-19 15:05:09 -0400 |
commit | d36316738785c96dab2ee892762ed08c059fffde (patch) | |
tree | 168a7c0705b5bc8f0dee7ce4b511ccf71759d9b4 /src/components/utils/test/conditional_variable_test.cc | |
parent | 7f7fcbb998fb17f2954fd103349af67ea9b71a3f (diff) | |
parent | 83c5e805346d55ec7fb9f4ba8b6f6855d992273e (diff) | |
download | sdl_core-d36316738785c96dab2ee892762ed08c059fffde.tar.gz |
Merge pull request #2572 from smartdevicelink/release/5.0.05.0.0hotfix/templates_updatesfeature/show_app_menufeature/progress_bar_seekfeature/open-menu-rpcfeature/open-menu-rfeature/button
Release 5.0.0
Diffstat (limited to 'src/components/utils/test/conditional_variable_test.cc')
-rw-r--r-- | src/components/utils/test/conditional_variable_test.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/components/utils/test/conditional_variable_test.cc b/src/components/utils/test/conditional_variable_test.cc index 524d53cafa..1ef29685e6 100644 --- a/src/components/utils/test/conditional_variable_test.cc +++ b/src/components/utils/test/conditional_variable_test.cc @@ -30,14 +30,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <iostream> #include <pthread.h> +#include <iostream> #include "gtest/gtest.h" +#include "utils/conditional_variable.h" #include "utils/lock.h" #include "utils/macro.h" -#include "utils/conditional_variable.h" namespace test { namespace components { @@ -61,8 +61,8 @@ class ConditionalVariableTest : public ::testing::Test { protected: std::string test_value_; - sync_primitives::ConditionalVariable cond_var_; sync_primitives::Lock test_mutex_; + sync_primitives::ConditionalVariable cond_var_; unsigned counter_; }; @@ -102,6 +102,7 @@ TEST_F(ConditionalVariableTest, cond_var_.WaitFor(test_lock, 2000); std::string last_value("changed again by thread 1"); EXPECT_EQ(last_value, test_value_); + pthread_join(thread1, NULL); } TEST_F(ConditionalVariableTest, @@ -116,6 +117,8 @@ TEST_F(ConditionalVariableTest, ASSERT_FALSE(thread_created) << "thread2 is not created!"; check_counter(); EXPECT_EQ(2u, counter_); + pthread_join(thread1, NULL); + pthread_join(thread2, NULL); } TEST_F( |