Skip to content

Commit 0328c76

Browse files
committed
Created shared specs for thread pool executors.
1 parent 18729b0 commit 0328c76

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

spec/concurrent/java_thread_pool_executor_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
if jruby?
44

5-
require_relative 'thread_pool_shared'
5+
require_relative 'thread_pool_executor_shared'
66

77
module Concurrent
88

@@ -23,7 +23,7 @@ module Concurrent
2323
)
2424
end
2525

26-
it_should_behave_like :thread_pool
26+
it_should_behave_like :thread_pool_executor
2727
end
2828
end
2929
end

spec/concurrent/ruby_thread_pool_executor_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require 'spec_helper'
2-
3-
require_relative 'thread_pool_shared'
2+
require_relative 'thread_pool_executor_shared'
43

54
module Concurrent
65

@@ -21,6 +20,6 @@ module Concurrent
2120
)
2221
end
2322

24-
it_should_behave_like :thread_pool
23+
it_should_behave_like :thread_pool_executor
2524
end
2625
end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
require 'spec_helper'
2+
require_relative 'thread_pool_shared'
3+
4+
share_examples_for :thread_pool_executor do
5+
6+
after(:each) do
7+
subject.kill
8+
sleep(0.1)
9+
end
10+
11+
it_should_behave_like :thread_pool
12+
end

0 commit comments

Comments
 (0)