diff options
Diffstat (limited to 'opendc-compute/opendc-compute-simulator/src/test')
2 files changed, 7 insertions, 7 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt index 1634473e..f63d4c6f 100644 --- a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt +++ b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt @@ -43,7 +43,7 @@ import org.opendc.simulator.compute.workload.SimTraceFragment import org.opendc.simulator.compute.workload.SimTraceWorkload import org.opendc.simulator.flow.FlowEngine import org.opendc.simulator.flow.mux.FlowMultiplexerFactory -import org.opendc.simulator.kotlin.runBlockingSimulation +import org.opendc.simulator.kotlin.runSimulation import java.time.Instant import java.util.* import kotlin.coroutines.resume @@ -68,7 +68,7 @@ internal class SimHostTest { * Test overcommitting of resources by the hypervisor. */ @Test - fun testOvercommitted() = runBlockingSimulation { + fun testOvercommitted() = runSimulation { val duration = 5 * 60L val engine = FlowEngine(coroutineContext, clock) val machine = SimBareMetalMachine(engine, machineModel, SimplePowerDriver(ConstantPowerModel(0.0))) @@ -152,7 +152,7 @@ internal class SimHostTest { * Test failure of the host. */ @Test - fun testFailure() = runBlockingSimulation { + fun testFailure() = runSimulation { val duration = 5 * 60L val engine = FlowEngine(coroutineContext, clock) val machine = SimBareMetalMachine(engine, machineModel, SimplePowerDriver(ConstantPowerModel(0.0))) diff --git a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/failure/HostFaultInjectorTest.kt b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/failure/HostFaultInjectorTest.kt index 5b71e716..90f534e6 100644 --- a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/failure/HostFaultInjectorTest.kt +++ b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/failure/HostFaultInjectorTest.kt @@ -29,7 +29,7 @@ import org.apache.commons.math3.distribution.LogNormalDistribution import org.apache.commons.math3.random.Well19937c import org.junit.jupiter.api.Test import org.opendc.compute.simulator.SimHost -import org.opendc.simulator.kotlin.runBlockingSimulation +import org.opendc.simulator.kotlin.runSimulation import java.time.Clock import java.time.Duration import kotlin.coroutines.CoroutineContext @@ -43,7 +43,7 @@ internal class HostFaultInjectorTest { * Simple test case to test that nothing happens when the injector is not started. */ @Test - fun testInjectorNotStarted() = runBlockingSimulation { + fun testInjectorNotStarted() = runSimulation { val host = mockk<SimHost>(relaxUnitFun = true) val injector = createSimpleInjector(coroutineContext, clock, setOf(host)) @@ -58,7 +58,7 @@ internal class HostFaultInjectorTest { * Simple test case to test a start stop fault where the machine is stopped and started after some time. */ @Test - fun testInjectorStopsMachine() = runBlockingSimulation { + fun testInjectorStopsMachine() = runSimulation { val host = mockk<SimHost>(relaxUnitFun = true) val injector = createSimpleInjector(coroutineContext, clock, setOf(host)) @@ -77,7 +77,7 @@ internal class HostFaultInjectorTest { * Simple test case to test a start stop fault where multiple machines are stopped. */ @Test - fun testInjectorStopsMultipleMachines() = runBlockingSimulation { + fun testInjectorStopsMultipleMachines() = runSimulation { val hosts = listOf<SimHost>( mockk(relaxUnitFun = true), mockk(relaxUnitFun = true) |
