From 5c8cecaf5b8d24ffcd99ce45b922c5a853bd492d Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 21 Apr 2021 11:01:07 +0200 Subject: simulator: Simplify scheduling logic of resource aggregator This change simplifies the scheduling logic of the resource aggregator. Previously, after each scheduling cycle, each aggregated input was interrupted. With the new approach, the scheduler can decide which ones of the inputs to send a new command to. --- .../org/opendc/simulator/resources/SimResourceAggregatorMaxMinTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opendc-simulator/opendc-simulator-resources/src/test') diff --git a/opendc-simulator/opendc-simulator-resources/src/test/kotlin/org/opendc/simulator/resources/SimResourceAggregatorMaxMinTest.kt b/opendc-simulator/opendc-simulator-resources/src/test/kotlin/org/opendc/simulator/resources/SimResourceAggregatorMaxMinTest.kt index e272abb8..e78bcdac 100644 --- a/opendc-simulator/opendc-simulator-resources/src/test/kotlin/org/opendc/simulator/resources/SimResourceAggregatorMaxMinTest.kt +++ b/opendc-simulator/opendc-simulator-resources/src/test/kotlin/org/opendc/simulator/resources/SimResourceAggregatorMaxMinTest.kt @@ -139,7 +139,7 @@ internal class SimResourceAggregatorMaxMinTest { val consumer = mockk(relaxUnitFun = true) every { consumer.onNext(any()) } .returns(SimResourceCommand.Consume(1.0, 1.0)) - .andThenThrows(IllegalStateException()) + .andThenThrows(IllegalStateException("Test Exception")) try { assertThrows { aggregator.output.consume(consumer) } -- cgit v1.2.3