Skip to content

Commit

Permalink
test: fix flaky test_thread_switch test
Browse files Browse the repository at this point in the history
  • Loading branch information
godzie44 committed May 28, 2024
1 parent 1257857 commit bf6464e
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions tests/integration/test_multithread.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,11 @@ def test_thread_switch(self):
self.debugger.cmd('step', '/linux/nanosleep.c')

self.debugger.cmd('step')
time.sleep(0.2)
time.sleep(1)
self.debugger.cmd('step')
time.sleep(0.2)
self.debugger.cmd('step')
time.sleep(0.2)

self.debugger.expect_in_output('24 let mut sum = 0;')
self.debugger.cmd('step')
time.sleep(0.2)

time.sleep(1)
self.debugger.cmd('step', '24 let mut sum = 0;')
self.debugger.cmd('step', '25 for i in 0..10000')
# try to view variables from a new in-focus thread
self.debugger.cmd('var locals', 'sum = i32(0)')

Expand Down

0 comments on commit bf6464e

Please sign in to comment.