We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ee895e commit 7e04d0eCopy full SHA for 7e04d0e
test/win32ole/test_win32ole_event.rb
@@ -65,12 +65,13 @@ def message_loop(watch_ivar = nil)
65
if watch_ivar
66
# wait until event is proceeded
67
tries = 0
68
+ seconds = EnvUtil.apply_timeout_scale(1)
69
while tries < 5 && instance_variable_get(watch_ivar) == orig_ivar
- seconds = 2 ** tries # sleep at most 31s in total
70
$stderr.puts "test_win32ole_event.rb: retrying and sleeping #{seconds}s until #{watch_ivar} is changed from #{orig_ivar.inspect}..."
71
WIN32OLE_EVENT.message_loop
72
sleep(seconds)
73
tries += 1
74
+ seconds *= 2 # sleep at most 31s in total
75
end
76
77
0 commit comments