From 1346e39ce6e3cef0f120efde4ebf13ae045ecc02 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Sat, 27 Oct 2018 14:06:44 +0000 Subject: [PATCH] spec/../shared/exit.rb: move the mingw guard to here from terminate_spec.rb, as suggested here: https://github.com/ruby/ruby/commit/c7220bd3dea0a113b81f267cc3b656da7d7d7abb#commitcomment-31068714 to guard other inclusions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/core/thread/shared/exit.rb | 6 ++++++ spec/ruby/core/thread/terminate_spec.rb | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/spec/ruby/core/thread/shared/exit.rb b/spec/ruby/core/thread/shared/exit.rb index 0c9198c538..3c63517d92 100644 --- a/spec/ruby/core/thread/shared/exit.rb +++ b/spec/ruby/core/thread/shared/exit.rb @@ -3,6 +3,10 @@ describe :thread_exit, shared: true do ScratchPad.clear end + # This spec randomly kills mspec worker like: https://ci.appveyor.com/project/ruby/ruby/builds/19390874/job/wv1bsm8skd4e1pxl + # TODO: Investigate the cause or at least print helpful logs, and remove this `platform_is_not` guard. + platform_is_not :mingw do + it "kills sleeping thread" do sleeping_thread = Thread.new do sleep @@ -173,4 +177,6 @@ describe :thread_exit, shared: true do t.join.should == t end end + + end # platform_is_not :mingw end diff --git a/spec/ruby/core/thread/terminate_spec.rb b/spec/ruby/core/thread/terminate_spec.rb index 9815a7cee7..cf6cab472b 100644 --- a/spec/ruby/core/thread/terminate_spec.rb +++ b/spec/ruby/core/thread/terminate_spec.rb @@ -3,9 +3,5 @@ require_relative 'fixtures/classes' require_relative 'shared/exit' describe "Thread#terminate" do - # This spec randomly kills mspec worker like: https://ci.appveyor.com/project/ruby/ruby/builds/19390874/job/wv1bsm8skd4e1pxl - # TODO: Investigate the cause or at least print helpful logs, and remove this `platform_is_not` guard. - platform_is_not :mingw do - it_behaves_like :thread_exit, :terminate - end + it_behaves_like :thread_exit, :terminate end