Commit ae197797 authored by Nghia Truong's avatar Nghia Truong
Browse files

COMP: Increase thread sleep time from 1ms to 10ms for multi-threading test

parent 8f0ced05
......@@ -138,7 +138,7 @@ TEST_F(imstkModuleTest, ControlModule)
ASSERT_FALSE(m_module.m_cleanup);
auto t = std::thread([this] { m_module.start(); });
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::milliseconds(10));
ASSERT_EQ(m_module.getStatus(), ModuleStatus::RUNNING);
ASSERT_TRUE(m_module.m_init);
ASSERT_TRUE(m_module.m_run);
......@@ -147,21 +147,21 @@ TEST_F(imstkModuleTest, ControlModule)
m_module.pause();
ASSERT_EQ(m_module.getStatus(), ModuleStatus::PAUSED);
m_module.m_run = false;
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::milliseconds(10));
ASSERT_TRUE(m_module.m_init);
ASSERT_FALSE(m_module.m_run);
ASSERT_FALSE(m_module.m_cleanup);
m_module.run();
ASSERT_EQ(m_module.getStatus(), ModuleStatus::RUNNING);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::milliseconds(10));
ASSERT_TRUE(m_module.m_init);
ASSERT_TRUE(m_module.m_run);
ASSERT_FALSE(m_module.m_cleanup);
m_module.end();
ASSERT_EQ(m_module.getStatus(), ModuleStatus::INACTIVE);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::milliseconds(10));
ASSERT_TRUE(m_module.m_init);
ASSERT_TRUE(m_module.m_run);
ASSERT_TRUE(m_module.m_cleanup);
......@@ -170,7 +170,7 @@ TEST_F(imstkModuleTest, ControlModule)
m_module.m_init = m_module.m_run = m_module.m_cleanup = false;
t = std::thread([this] { m_module.start(); });
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::milliseconds(10));
ASSERT_EQ(m_module.getStatus(), ModuleStatus::RUNNING);
ASSERT_TRUE(m_module.m_init);
ASSERT_TRUE(m_module.m_run);
......@@ -179,14 +179,14 @@ TEST_F(imstkModuleTest, ControlModule)
m_module.pause();
ASSERT_EQ(m_module.getStatus(), ModuleStatus::PAUSED);
m_module.m_run = false;
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::milliseconds(10));
ASSERT_TRUE(m_module.m_init);
ASSERT_FALSE(m_module.m_run);
ASSERT_FALSE(m_module.m_cleanup);
m_module.end();
ASSERT_EQ(m_module.getStatus(), ModuleStatus::INACTIVE);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::milliseconds(10));
ASSERT_TRUE(m_module.m_init);
ASSERT_FALSE(m_module.m_run);
ASSERT_TRUE(m_module.m_cleanup);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment