File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 2828
2929RSpec . configure do |config |
3030 config . order = 'random'
31+
32+ config . before ( :each ) do
33+ #TODO: Better configuration management in individual test suites
34+ reset_gem_configuration
35+ end
36+
37+ config . after ( :each ) do
38+ #TODO: Better thread management in individual test suites
39+ kill_rogue_threads ( false )
40+ end
3141end
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ def reset_gem_configuration
2626 Concurrent . instance_variable_set ( :@configuration , Concurrent ::Configuration . new )
2727 end
2828
29- def kill_rogue_threads
30- warn '[DEPRECATED] brute force thread control being used -- tests need updated'
29+ def kill_rogue_threads ( warning = true )
30+ warn ( '[DEPRECATED] brute force thread control being used -- tests need updated' ) if warning
3131 Thread . list . each do |thread |
3232 thread . kill unless thread == Thread . current
3333 end
You can’t perform that action at this time.
0 commit comments