Skip to content

Commit 43403ce

Browse files
committed
Refactored more intermittenly failing specs.
1 parent 1583758 commit 43403ce

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

spec/concurrent/scheduled_task_spec.rb

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require 'spec_helper'
22
require 'timecop'
3-
require_relative 'dereferenceable_shared'
43
require_relative 'obligation_shared'
54
require_relative 'observable_shared'
65

@@ -38,23 +37,7 @@ module Concurrent
3837

3938
# dereferenceable
4039

41-
def dereferenceable_subject(value, opts = {})
42-
latch = Concurrent::CountDownLatch.new(1)
43-
task = ScheduledTask.execute(0.1, opts){ value }.tap{ latch.count_down }
44-
latch.wait(1)
45-
task
46-
end
47-
48-
def dereferenceable_observable(opts = {})
49-
ScheduledTask.new(0.1, opts){ 'value' }
50-
end
51-
52-
def execute_dereferenceable(subject)
53-
subject.execute
54-
sleep(0.2)
55-
end
56-
57-
it_should_behave_like :dereferenceable
40+
specify{ ScheduledTask.ancestors.should include(Dereferenceable) }
5841

5942
# observable
6043

0 commit comments

Comments
 (0)