File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from test .pytestutils import before
44from test .help_utils import wait_for
55from mock import MagicMock
6+ from time import sleep
67
78from codeguru_profiler_agent .profiler_runner import ProfilerRunner
89from codeguru_profiler_agent .profiler_disabler import ProfilerDisabler
@@ -87,6 +88,9 @@ def test_when_orchestrator_says_no_to_profiler(self):
8788 self .profiler_runner .start ()
8889 # still it is safer to wait until the new config has been applied
8990 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 )
9094
9195 assert self .profiler_runner .scheduler ._get_next_delay_seconds () == 151
9296 self .mock_collector .add .assert_not_called ()
You can’t perform that action at this time.
0 commit comments