Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a3f0b65

Browse files
committed
Added test for chunk-optional-processor project.
1 parent 44cae22 commit a3f0b65

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

batch/chunk-optional-processor/src/test/java/org/javaee7/batch/chunk/optional/processor/BatchChunkOptionalProcessorTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import org.jboss.shrinkwrap.api.ShrinkWrap;
88
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
99
import org.jboss.shrinkwrap.api.spec.WebArchive;
10-
import org.junit.Assert;
1110
import org.junit.Test;
1211
import org.junit.runner.RunWith;
1312

@@ -36,7 +35,7 @@ public static WebArchive createDeployment() {
3635
}
3736

3837
@Test
39-
public void testBatchChunkMapper() throws Exception {
38+
public void testBatchChunkOptionalProcessor() throws Exception {
4039
JobOperator jobOperator = BatchRuntime.getJobOperator();
4140
Long executionId = jobOperator.start("myJob", new Properties());
4241
JobExecution jobExecution = jobOperator.getJobExecution(executionId);
@@ -47,9 +46,9 @@ public void testBatchChunkMapper() throws Exception {
4746
for (StepExecution stepExecution : stepExecutions) {
4847
if (stepExecution.getStepName().equals("myStep")) {
4948
Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
50-
Assert.assertEquals(10L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
51-
Assert.assertEquals(10L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
52-
Assert.assertEquals(10L/3 + 10%3, metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
49+
assertEquals(10L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
50+
assertEquals(10L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
51+
assertEquals(10L / 3 + 10 % 3, metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
5352
}
5453
}
5554

0 commit comments

Comments
 (0)