Merge pull request #9190 from amit2103/JAVA-62

fix junit test cases
This commit is contained in:
Loredana Crusoveanu 2020-04-27 13:43:29 +03:00 committed by GitHub
commit a04fb286e4
6 changed files with 18 additions and 23 deletions

View File

@ -1,20 +1,17 @@
package com.baeldung.batch.understanding; package com.baeldung.batch.understanding;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.Map;
import java.util.Properties; import java.util.Properties;
import javax.batch.operations.JobOperator; import javax.batch.operations.JobOperator;
import javax.batch.runtime.BatchRuntime; import javax.batch.runtime.BatchRuntime;
import javax.batch.runtime.BatchStatus; import javax.batch.runtime.BatchStatus;
import javax.batch.runtime.JobExecution; import javax.batch.runtime.JobExecution;
import javax.batch.runtime.Metric;
import javax.batch.runtime.StepExecution; import javax.batch.runtime.StepExecution;
import com.baeldung.batch.understanding.BatchTestHelper;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
@Disabled("Should be fixed in BAEL-3812")
class CustomCheckPointUnitTest { class CustomCheckPointUnitTest {
@Test @Test
public void givenChunk_whenCustomCheckPoint_thenCommitCountIsThree() throws Exception { public void givenChunk_whenCustomCheckPoint_thenCommitCountIsThree() throws Exception {

View File

@ -1,6 +1,8 @@
package com.baeldung.batch.understanding; package com.baeldung.batch.understanding;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -13,9 +15,7 @@ import javax.batch.runtime.JobExecution;
import javax.batch.runtime.StepExecution; import javax.batch.runtime.StepExecution;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
@Disabled("Should be fixed in BAEL-3812")
class JobSequenceUnitTest { class JobSequenceUnitTest {
@Test @Test
public void givenTwoSteps_thenBatch_CompleteWithSuccess() throws Exception { public void givenTwoSteps_thenBatch_CompleteWithSuccess() throws Exception {

View File

@ -1,17 +1,16 @@
package com.baeldung.batch.understanding; package com.baeldung.batch.understanding;
import org.junit.jupiter.api.Disabled; import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
import java.util.Properties;
import javax.batch.operations.JobOperator; import javax.batch.operations.JobOperator;
import javax.batch.runtime.BatchRuntime; import javax.batch.runtime.BatchRuntime;
import javax.batch.runtime.BatchStatus; import javax.batch.runtime.BatchStatus;
import javax.batch.runtime.JobExecution; import javax.batch.runtime.JobExecution;
import java.util.Properties;
import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test;
@Disabled("Should be fixed in BAEL-3812")
class SimpleBatchLetUnitTest { class SimpleBatchLetUnitTest {
@Test @Test
public void givenBatchLet_thenBatch_CompleteWithSuccess() throws Exception { public void givenBatchLet_thenBatch_CompleteWithSuccess() throws Exception {

View File

@ -1,6 +1,7 @@
package com.baeldung.batch.understanding; package com.baeldung.batch.understanding;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -14,9 +15,7 @@ import javax.batch.runtime.Metric;
import javax.batch.runtime.StepExecution; import javax.batch.runtime.StepExecution;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
@Disabled("Should be fixed in BAEL-3812")
class SimpleChunkUnitTest { class SimpleChunkUnitTest {
@Test @Test
public void givenChunk_thenBatch_CompletesWithSucess() throws Exception { public void givenChunk_thenBatch_CompletesWithSucess() throws Exception {

View File

@ -1,19 +1,18 @@
package com.baeldung.batch.understanding; package com.baeldung.batch.understanding;
import org.junit.jupiter.api.Disabled; import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;
import java.util.List;
import java.util.Properties;
import javax.batch.operations.JobOperator; import javax.batch.operations.JobOperator;
import javax.batch.runtime.BatchRuntime; import javax.batch.runtime.BatchRuntime;
import javax.batch.runtime.BatchStatus; import javax.batch.runtime.BatchStatus;
import javax.batch.runtime.JobExecution; import javax.batch.runtime.JobExecution;
import javax.batch.runtime.StepExecution; import javax.batch.runtime.StepExecution;
import java.util.List;
import java.util.Properties;
import static org.junit.Assert.assertEquals; import org.junit.jupiter.api.Test;
@Disabled("Should be fixed in BAEL-3812")
class SimpleErrorChunkUnitTest { class SimpleErrorChunkUnitTest {
@Test @Test

View File

@ -0,0 +1 @@
db-url=jdbc:h2:mem:jberet-repo;DB_CLOSE_DELAY=-1