aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/test/java/com/yahoo/processing/execution/test/AsyncExecutionTestCase.java
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@yahooinc.com>2022-07-28 15:10:47 +0200
committerBjørn Christian Seime <bjorncs@yahooinc.com>2022-07-28 15:10:47 +0200
commit9bf664ba9a153a404f03c39d5ba0f99eb32c4419 (patch)
tree1eeda1293a2d453c9acd11deb736be4e53e58975 /container-core/src/test/java/com/yahoo/processing/execution/test/AsyncExecutionTestCase.java
parent147fa8c912c8748a9b4eb25c67420841363f3be0 (diff)
Convert container-core to junit5
Diffstat (limited to 'container-core/src/test/java/com/yahoo/processing/execution/test/AsyncExecutionTestCase.java')
-rw-r--r--container-core/src/test/java/com/yahoo/processing/execution/test/AsyncExecutionTestCase.java38
1 files changed, 19 insertions, 19 deletions
diff --git a/container-core/src/test/java/com/yahoo/processing/execution/test/AsyncExecutionTestCase.java b/container-core/src/test/java/com/yahoo/processing/execution/test/AsyncExecutionTestCase.java
index 22f69a87bc3..fb469c36e14 100644
--- a/container-core/src/test/java/com/yahoo/processing/execution/test/AsyncExecutionTestCase.java
+++ b/container-core/src/test/java/com/yahoo/processing/execution/test/AsyncExecutionTestCase.java
@@ -6,10 +6,10 @@ import com.yahoo.processing.Processor;
import com.yahoo.processing.Request;
import com.yahoo.processing.Response;
import com.yahoo.processing.execution.Execution;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import static com.yahoo.processing.test.ProcessorLibrary.*;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* @author bratseth
@@ -18,29 +18,29 @@ public class AsyncExecutionTestCase {
/** Execute a processing chain which forks off into multiple threads */
@Test
- public void testAsyncExecution() {
+ void testAsyncExecution() {
// Create a chain
- Chain<Processor> chain=new Chain<>(new CombineData(),new BlockingSplitter(2),new Get6DataItems(), new DataSource());
+ Chain<Processor> chain = new Chain<>(new CombineData(), new BlockingSplitter(2), new Get6DataItems(), new DataSource());
// Execute it
- Request request=new Request();
- request.properties().set("appendage",1);
- Response response=Execution.createRoot(chain,0,Execution.Environment.createEmpty()).process(request);
+ Request request = new Request();
+ request.properties().set("appendage", 1);
+ Response response = Execution.createRoot(chain, 0, Execution.Environment.createEmpty()).process(request);
// Verify the result
- assertEquals(6*2-1,response.data().asList().size());
- assertEquals("first.2, third.2",response.data().get(0).toString());
- assertEquals("second.2",response.data().get(1).toString());
- assertEquals("first.3",response.data().get(2).toString());
- assertEquals("second.3",response.data().get(3).toString());
- assertEquals("third.3",response.data().get(4).toString());
+ assertEquals(6 * 2 - 1, response.data().asList().size());
+ assertEquals("first.2, third.2", response.data().get(0).toString());
+ assertEquals("second.2", response.data().get(1).toString());
+ assertEquals("first.3", response.data().get(2).toString());
+ assertEquals("second.3", response.data().get(3).toString());
+ assertEquals("third.3", response.data().get(4).toString());
// from the parallel execution
- assertEquals("first.2",response.data().get(5).toString());
- assertEquals("second.2",response.data().get(6).toString());
- assertEquals("third.2",response.data().get(7).toString());
- assertEquals("first.3",response.data().get(8).toString());
- assertEquals("second.3",response.data().get(9).toString());
- assertEquals("third.3",response.data().get(10).toString());
+ assertEquals("first.2", response.data().get(5).toString());
+ assertEquals("second.2", response.data().get(6).toString());
+ assertEquals("third.2", response.data().get(7).toString());
+ assertEquals("first.3", response.data().get(8).toString());
+ assertEquals("second.3", response.data().get(9).toString());
+ assertEquals("third.3", response.data().get(10).toString());
}
}