diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-27 10:49:56 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-27 10:49:56 +0000 |
commit | a7f0cbe9c834fdb55f5c5f4e59499ef21f679a20 (patch) | |
tree | 369deef5e3a00933ea9f4bd297bc9f7323dcede6 /spec | |
parent | 3e6337b88b5255aba07b8f44de72cd5885f59465 (diff) | |
download | ruby-a7f0cbe9c834fdb55f5c5f4e59499ef21f679a20.tar.gz |
ole_func_methods_spec.rb: apply r64993 retry
to this spec as well, since the same issue was reproduced here
https://ci.appveyor.com/project/ruby/ruby/builds/19842006/job/y35ae6bquf4t3x30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb b/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb index 8a510519f2..8b5b9c13ed 100644 --- a/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb @@ -5,7 +5,20 @@ platform_is :windows do describe "WIN32OLE#ole_func_methods" do before :each do - @ie = WIN32OLESpecs.new_ole('InternetExplorer.Application') + # This part is unstable, so retrying 3 times. + tries = 0 + begin + @ie = WIN32OLESpecs.new_ole('InternetExplorer.Application') + rescue WIN32OLERuntimeError => e + # WIN32OLERuntimeError: failed to create WIN32OLE object from `InternetExplorer.Application' + # HRESULT error code:0x800704a6 + # A system shutdown has already been scheduled. + if tries < 3 + tries += 1 + $stderr.puts "WIN32OLE#ole_func_methods retry (#{tries}): #{e.class}: #{e.message}" + retry + end + end end after :each do |