From c214a7fe0d46ecc23a71f9237b20281c0ca1c929 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 5 Oct 2022 13:22:40 +0200 Subject: refactor(sim/core): Use SimulationScheduler in coroutine dispatcher This change updates the implementation of `SimulationDispatcher` to use a (possibly user-provided) `SimulationScheduler` for managing the execution of the simulation and future tasks. --- .../src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt | 2 +- .../kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'opendc-simulator/opendc-simulator-network/src/test') diff --git a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt index 2e6983c8..8e95f2b0 100644 --- a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt +++ b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt @@ -30,9 +30,9 @@ import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.api.assertThrows -import org.opendc.simulator.core.runBlockingSimulation import org.opendc.simulator.flow.* import org.opendc.simulator.flow.source.FixedFlowSource +import org.opendc.simulator.kotlin.runBlockingSimulation /** * Test suite for the [SimNetworkSink] class. diff --git a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt index 62e54ffb..b45b150d 100644 --- a/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt +++ b/opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt @@ -27,9 +27,9 @@ import io.mockk.verify import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows -import org.opendc.simulator.core.runBlockingSimulation import org.opendc.simulator.flow.* import org.opendc.simulator.flow.source.FixedFlowSource +import org.opendc.simulator.kotlin.runBlockingSimulation /** * Test suite for the [SimNetworkSwitchVirtual] class. -- cgit v1.2.3