Skip to content

Commit 379b498

Browse files
committed
amend test case for join schedules and blockages
1 parent 7ced6d1 commit 379b498

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

ciw/tests/test_simulation.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,9 @@ def test_schedules_and_blockages_work_together(self):
788788
[0.1, 0.9]]},
789789
Queue_capacities=[2, 2]
790790
)
791-
ciw.seed(0)
792-
Q = ciw.Simulation(N)
793-
Q.simulate_until_max_time(120)
794-
recs = Q.get_all_records()
795-
waits = [r.waiting_time for r in recs]
796-
average_wait = sum(waits) / len(waits)
797-
self.assertEqual(round(average_wait, 5), 3.62446)
791+
792+
ciw.seed(6)
793+
Q = ciw.Simulation(N, deadlock_detector='StateDigraph')
794+
Q.simulate_until_deadlock()
795+
ttd = Q.times_to_deadlock[((0, 0), (0, 0))]
796+
self.assertEqual(round(ttd, 5), 92.49468)

0 commit comments

Comments
 (0)