summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-simulator/opendc-simulator-flow/src/test/kotlin/org')
-rw-r--r--opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow2/mux/ForwardingFlowMultiplexerTest.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow2/mux/ForwardingFlowMultiplexerTest.kt b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow2/mux/ForwardingFlowMultiplexerTest.kt
index fef49786..d1795841 100644
--- a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow2/mux/ForwardingFlowMultiplexerTest.kt
+++ b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow2/mux/ForwardingFlowMultiplexerTest.kt
@@ -22,6 +22,7 @@
package org.opendc.simulator.flow2.mux
+import kotlinx.coroutines.yield
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertAll
@@ -46,6 +47,10 @@ class ForwardingFlowMultiplexerTest {
val sink = SimpleFlowSink(graph, 3200.0f)
graph.connect(switch.newOutput(), sink.input)
+ yield()
+
+ assertEquals(sink.capacity, switch.capacity) { "Capacity is not detected" }
+
val workload =
TraceFlowSource(
graph,