Skip to content

Commit 64213b5

Browse files
Addressed comments - used wait_for(..) instead of sleep(..).
1 parent e0eb42b commit 64213b5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/unit/test_profiler_runner.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ def test_when_orchestrator_says_no_to_profiler(self):
8888
self.profiler_runner.start()
8989
# still it is safer to wait until the new config has been applied
9090
wait_for(lambda: AgentConfiguration.get().reporting_interval.total_seconds() == 151)
91-
# sometimes it takes a few milliseconds for the scheduler to be updated with the AgentConfiguration,
92-
# so let's sleep for 100 ms
93-
sleep(0.1)
91+
wait_for(lambda: self.profiler_runner.scheduler._get_next_delay_seconds() == 151)
9492

9593
assert self.profiler_runner.scheduler._get_next_delay_seconds() == 151
9694
self.mock_collector.add.assert_not_called()

0 commit comments

Comments
 (0)