Skip to content

Commit 4d16c6f

Browse files
committed
Stabilize chaining test
1 parent a10f7ae commit 4d16c6f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/world_test.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,15 @@ module WorldTest
5757
plan1 = world.plan(Support::DummyExample::Dummy)
5858
plan2 = world.chain(plan1.id, Support::DummyExample::Dummy)
5959

60-
ready = world.persistence.find_ready_delayed_plans(Time.now)
61-
_(ready.count).must_equal 0
60+
preexisting = world.persistence.find_ready_delayed_plans(Time.now).map(&:execution_plan_uuid)
6261

6362
done = Concurrent::Promises.resolvable_future
6463
world.execute(plan1.id, done)
6564
done.wait
6665

6766
plan1 = world.persistence.load_execution_plan(plan1.id)
6867
_(plan1.state).must_equal :stopped
69-
ready = world.persistence.find_ready_delayed_plans(Time.now)
68+
ready = world.persistence.find_ready_delayed_plans(Time.now).reject { |p| preexisting.include? p.execution_plan_uuid }
7069
_(ready.count).must_equal 1
7170
_(ready.first.execution_plan_uuid).must_equal plan2.execution_plan_id
7271
end

0 commit comments

Comments
 (0)