diff --git a/src/main/java/teetime/variant/methodcallWithPorts/stage/Relay.java b/src/main/java/teetime/variant/methodcallWithPorts/stage/Relay.java index cec12ca5ea92132d5b11d770d2a6572616a57c5b..b0a6325c381c44724c67cf6db98f64de2d88afbc 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/stage/Relay.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/stage/Relay.java @@ -18,6 +18,7 @@ public class Relay<T> extends AbstractStage<T, T> { this.logger.debug("got end signal; pipe.size: " + this.getInputPort().getPipe().size()); assert 0 == this.getInputPort().getPipe().size(); } + Thread.yield(); return; } this.send(element); diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java index 544c0b5e1d6b663bfc5cc5822af7917cf328bb13..2353d5232014ce3f7383222697131d3e317bdaeb 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java @@ -22,7 +22,9 @@ import java.util.concurrent.TimeUnit; import org.junit.After; import org.junit.Before; +import org.junit.FixMethodOrder; import org.junit.Test; +import org.junit.runners.MethodSorters; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; @@ -32,6 +34,7 @@ import teetime.util.StopWatch; * * @since 1.10 */ +@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest { private StopWatch stopWatch;