File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ def stop() super(); stopped = true; end
6565
6666 after ( :each ) do
6767 subject . stop
68+ kill_rogue_threads
6869 sleep ( 0.1 )
6970 end
7071
@@ -846,7 +847,7 @@ def mock_thread(status = 'run')
846847 supervisor = Supervisor . new ( restart_strategy : :one_for_one ,
847848 monitor_interval : 0.1 )
848849 supervisor . add_worker ( error_class . new )
849- supervisor . should_receive ( :exceeded_max_restart_frequency? ) . once . and_return ( true )
850+ supervisor . stub ( :exceeded_max_restart_frequency? ) . once . and_return ( true )
850851 future = Concurrent ::Future . execute { supervisor . run }
851852 future . value ( 1 )
852853 supervisor . should_not be_running
Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ 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'
31+ Thread . list . each do |thread |
32+ thread . kill unless thread == Thread . current
33+ end
34+ end
35+
2936 extend self
3037 end
3138end
You can’t perform that action at this time.
0 commit comments