Skip to content

Commit

Permalink
Add waitDuration variable
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters committed Feb 8, 2021
1 parent eae6578 commit f07cb03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/regression/cpp/simulation_runner_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ TEST_F(SimulationRunnerTest, ConsumedEventOnQueueWhenPaused) {
sim_runner_->PauseSimulation();

// Wait and ensure no steps are taken
std::this_thread::sleep_for(std::chrono::milliseconds(100));
const auto waitDuration = std::chrono::milliseconds(100);
std::this_thread::sleep_for(waitDuration);
{
const InteractiveSimulationStats& stats = sim_runner_->GetStats();
EXPECT_EQ(0, stats.TotalExecutedSteps());
Expand All @@ -136,7 +137,7 @@ TEST_F(SimulationRunnerTest, ConsumedEventOnQueueWhenPaused) {
EXPECT_TRUE(result);

// Wait and ensure that it starts stepping again
std::this_thread::sleep_for(std::chrono::milliseconds(100));
std::this_thread::sleep_for(waitDuration);

const InteractiveSimulationStats& stats = sim_runner_->GetStats();
EXPECT_LE(1, stats.TotalExecutedSteps());
Expand Down

0 comments on commit f07cb03

Please sign in to comment.