From fc113be4a7c1b68e7dae806facb1b9343991b2dc Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Wed, 17 Feb 2021 16:08:28 +0100 Subject: [PATCH] Temporarily ignore intermittently failing tests This commit temporarily ignores tests that are failing intermittently on Windows. A link to the corresponding issue has been added to each test. FTR, I tried to ignore those tests only on Windows by using `Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS);` where `SystemUtils` is from `org.apache.commons.lang3` but this assumption does not seem to work as expected. --- .../batch/core/jsr/partition/JsrPartitionHandlerTests.java | 4 +++- .../core/test/concurrent/ConcurrentTransactionTests.java | 5 ++++- .../jms/BatchMessageListenerContainerIntegrationTests.java | 5 ++++- .../springframework/batch/jms/ExternalRetryInBatchTests.java | 4 ++-- .../springframework/batch/repeat/jms/AsynchronousTests.java | 4 +++- .../springframework/batch/repeat/jms/SynchronousTests.java | 4 +++- .../springframework/batch/retry/jms/ExternalRetryTests.java | 4 +++- .../springframework/batch/retry/jms/SynchronousTests.java | 4 +++- .../transaction/ConcurrentTransactionAwareProxyTests.java | 3 ++- 9 files changed, 27 insertions(+), 10 deletions(-) diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/jsr/partition/JsrPartitionHandlerTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/jsr/partition/JsrPartitionHandlerTests.java index 7f9b2ee21..ad6037396 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/jsr/partition/JsrPartitionHandlerTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/jsr/partition/JsrPartitionHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2019 the original author or authors. + * Copyright 2013-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package org.springframework.batch.core.jsr.partition; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.springframework.batch.core.ExitStatus; import org.springframework.batch.core.JobExecution; @@ -51,6 +52,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +@Ignore // FIXME https://github.com/spring-projects/spring-batch/issues/3850 public class JsrPartitionHandlerTests extends AbstractJsrTestCase { private JsrPartitionHandler handler; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/test/concurrent/ConcurrentTransactionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/test/concurrent/ConcurrentTransactionTests.java index e7c089855..4bfb8eeb1 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/test/concurrent/ConcurrentTransactionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/test/concurrent/ConcurrentTransactionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2019 the original author or authors. + * Copyright 2015-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import java.sql.SQLException; import java.sql.Statement; import javax.sql.DataSource; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -63,9 +64,11 @@ import static org.junit.Assert.assertEquals; /** * @author Michael Minella + * @author Mahmoud Ben Hassine */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = ConcurrentTransactionTests.ConcurrentJobConfiguration.class) +@Ignore // FIXME https://github.com/spring-projects/spring-batch/issues/3851 public class ConcurrentTransactionTests { @Autowired diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/container/jms/BatchMessageListenerContainerIntegrationTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/container/jms/BatchMessageListenerContainerIntegrationTests.java index 2afac42d9..c7e0b26a6 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/container/jms/BatchMessageListenerContainerIntegrationTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/container/jms/BatchMessageListenerContainerIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ import javax.jms.TextMessage; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -49,11 +50,13 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * @author Dave Syer + * @author Mahmoud Ben Hassine * */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/org/springframework/batch/jms/jms-context.xml") @DirtiesContext +@Ignore //FIXME https://github.com/spring-projects/spring-batch/issues/3852 public class BatchMessageListenerContainerIntegrationTests { @Autowired diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/jms/ExternalRetryInBatchTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/jms/ExternalRetryInBatchTests.java index 7c04c638c..e4894321b 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/jms/ExternalRetryInBatchTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/jms/ExternalRetryInBatchTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2019 the original author or authors. + * Copyright 2006-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,7 +54,7 @@ import static org.junit.Assert.assertEquals; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/org/springframework/batch/jms/jms-context.xml") -@Ignore("This test fails when integration tests are skipped..") // FIXME make this test independent of other tests +@Ignore //FIXME https://github.com/spring-projects/spring-batch/issues/3852 public class ExternalRetryInBatchTests { @Autowired diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/jms/AsynchronousTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/jms/AsynchronousTests.java index 6c764d1a5..5bedfb8a7 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/jms/AsynchronousTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/jms/AsynchronousTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import javax.sql.DataSource; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -47,6 +48,7 @@ import static org.junit.Assert.assertTrue; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/org/springframework/batch/jms/jms-context.xml") @DirtiesContext +@Ignore //FIXME https://github.com/spring-projects/spring-batch/issues/3852 public class AsynchronousTests { protected String[] getConfigLocations() { diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/jms/SynchronousTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/jms/SynchronousTests.java index 2cbb470d9..0f7ef290f 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/jms/SynchronousTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/jms/SynchronousTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ import javax.jms.JMSException; import javax.jms.Session; import javax.sql.DataSource; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -54,6 +55,7 @@ import org.springframework.transaction.support.TransactionTemplate; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/org/springframework/batch/jms/jms-context.xml") @DirtiesContext +@Ignore //FIXME https://github.com/spring-projects/spring-batch/issues/3852 public class SynchronousTests implements ApplicationContextAware { @Autowired diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/retry/jms/ExternalRetryTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/retry/jms/ExternalRetryTests.java index df41e25ec..490b6dd4e 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/retry/jms/ExternalRetryTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/retry/jms/ExternalRetryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2019 the original author or authors. + * Copyright 2006-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package org.springframework.batch.retry.jms; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.batch.item.ItemReader; @@ -47,6 +48,7 @@ import static org.junit.Assert.fail; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/org/springframework/batch/jms/jms-context.xml") +@Ignore //FIXME https://github.com/spring-projects/spring-batch/issues/3852 public class ExternalRetryTests { @Autowired diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/retry/jms/SynchronousTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/retry/jms/SynchronousTests.java index 3662be81f..44cdb479a 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/retry/jms/SynchronousTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/retry/jms/SynchronousTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package org.springframework.batch.retry.jms; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.batch.item.jms.JmsItemReader; @@ -49,6 +50,7 @@ import static org.junit.Assert.fail; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/org/springframework/batch/jms/jms-context.xml") +@Ignore //FIXME https://github.com/spring-projects/spring-batch/issues/3852 public class SynchronousTests { @Autowired diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/transaction/ConcurrentTransactionAwareProxyTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/transaction/ConcurrentTransactionAwareProxyTests.java index 012a9f635..e1f9c3e22 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/transaction/ConcurrentTransactionAwareProxyTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/transaction/ConcurrentTransactionAwareProxyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2020 the original author or authors. + * Copyright 2006-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,6 +50,7 @@ import org.springframework.util.Assert; * @author Mahmoud Ben Hassine * */ +@Ignore // FIXME https://github.com/spring-projects/spring-batch/issues/3847 public class ConcurrentTransactionAwareProxyTests { private static Log logger = LogFactory.getLog(ConcurrentTransactionAwareProxyTests.class);