summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-network/src
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-simulator/opendc-simulator-network/src')
-rw-r--r--opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSinkTest.kt16
-rw-r--r--opendc-simulator/opendc-simulator-network/src/test/kotlin/org/opendc/simulator/network/SimNetworkSwitchVirtualTest.kt6
2 files changed, 11 insertions, 11 deletions
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 8e95f2b0..944c4d6a 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
@@ -32,14 +32,14 @@ import org.junit.jupiter.api.assertDoesNotThrow
import org.junit.jupiter.api.assertThrows
import org.opendc.simulator.flow.*
import org.opendc.simulator.flow.source.FixedFlowSource
-import org.opendc.simulator.kotlin.runBlockingSimulation
+import org.opendc.simulator.kotlin.runSimulation
/**
* Test suite for the [SimNetworkSink] class.
*/
class SimNetworkSinkTest {
@Test
- fun testInitialState() = runBlockingSimulation {
+ fun testInitialState() = runSimulation {
val engine = FlowEngine(coroutineContext, clock)
val sink = SimNetworkSink(engine, capacity = 100.0)
@@ -49,7 +49,7 @@ class SimNetworkSinkTest {
}
@Test
- fun testDisconnectIdempotent() = runBlockingSimulation {
+ fun testDisconnectIdempotent() = runSimulation {
val engine = FlowEngine(coroutineContext, clock)
val sink = SimNetworkSink(engine, capacity = 100.0)
@@ -58,7 +58,7 @@ class SimNetworkSinkTest {
}
@Test
- fun testConnectCircular() = runBlockingSimulation {
+ fun testConnectCircular() = runSimulation {
val engine = FlowEngine(coroutineContext, clock)
val sink = SimNetworkSink(engine, capacity = 100.0)
@@ -68,7 +68,7 @@ class SimNetworkSinkTest {
}
@Test
- fun testConnectAlreadyConnectedTarget() = runBlockingSimulation {
+ fun testConnectAlreadyConnectedTarget() = runSimulation {
val engine = FlowEngine(coroutineContext, clock)
val sink = SimNetworkSink(engine, capacity = 100.0)
val source = mockk<SimNetworkPort>(relaxUnitFun = true)
@@ -80,7 +80,7 @@ class SimNetworkSinkTest {
}
@Test
- fun testConnectAlreadyConnected() = runBlockingSimulation {
+ fun testConnectAlreadyConnected() = runSimulation {
val engine = FlowEngine(coroutineContext, clock)
val sink = SimNetworkSink(engine, capacity = 100.0)
val source1 = Source(engine)
@@ -96,7 +96,7 @@ class SimNetworkSinkTest {
}
@Test
- fun testConnect() = runBlockingSimulation {
+ fun testConnect() = runSimulation {
val engine = FlowEngine(coroutineContext, clock)
val sink = SimNetworkSink(engine, capacity = 100.0)
val source = spyk(Source(engine))
@@ -112,7 +112,7 @@ class SimNetworkSinkTest {
}
@Test
- fun testDisconnect() = runBlockingSimulation {
+ fun testDisconnect() = runSimulation {
val engine = FlowEngine(coroutineContext, clock)
val sink = SimNetworkSink(engine, capacity = 100.0)
val source = spyk(Source(engine))
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 b45b150d..ff6cb66e 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
@@ -29,14 +29,14 @@ import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import org.opendc.simulator.flow.*
import org.opendc.simulator.flow.source.FixedFlowSource
-import org.opendc.simulator.kotlin.runBlockingSimulation
+import org.opendc.simulator.kotlin.runSimulation
/**
* Test suite for the [SimNetworkSwitchVirtual] class.
*/
class SimNetworkSwitchVirtualTest {
@Test
- fun testConnect() = runBlockingSimulation {
+ fun testConnect() = runSimulation {
val engine = FlowEngine(coroutineContext, clock)
val sink = SimNetworkSink(engine, capacity = 100.0)
val source = spyk(Source(engine))
@@ -54,7 +54,7 @@ class SimNetworkSwitchVirtualTest {
}
@Test
- fun testConnectClosedPort() = runBlockingSimulation {
+ fun testConnectClosedPort() = runSimulation {
val engine = FlowEngine(coroutineContext, clock)
val sink = SimNetworkSink(engine, capacity = 100.0)
val switch = SimNetworkSwitchVirtual(engine)