This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 0ccf4d2535 HDDS-10062. Delete JUnit4 categories (#5922)
0ccf4d2535 is described below

commit 0ccf4d253526996a782b67a47e6ab9633bbdde2d
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Mon Jan 8 19:40:24 2024 +0100

    HDDS-10062. Delete JUnit4 categories (#5922)
---
 .github/workflows/intermittent-test-check.yml      |  2 +-
 .../main/java/org/apache/ozone/test/FlakyTest.java | 28 --------------------
 .../main/java/org/apache/ozone/test/SlowTest.java  | 29 ---------------------
 .../java/org/apache/ozone/test/UnhealthyTest.java  | 30 ----------------------
 hadoop-ozone/dev-support/checks/native.sh          |  2 +-
 hadoop-ozone/dev-support/checks/unit.sh            |  6 +++--
 .../ozone/TestContainerBalancerOperations.java     |  4 +--
 .../rpc/TestOzoneRpcClientForAclAuditLog.java      |  3 ---
 .../freon/TestFreonWithDatanodeFastRestart.java    |  4 +--
 .../apache/hadoop/ozone/om/TestScmSafeMode.java    |  4 +--
 pom.xml                                            |  6 ++---
 11 files changed, 12 insertions(+), 106 deletions(-)

diff --git a/.github/workflows/intermittent-test-check.yml 
b/.github/workflows/intermittent-test-check.yml
index c1cb2dd6a3..d686ec41aa 100644
--- a/.github/workflows/intermittent-test-check.yml
+++ b/.github/workflows/intermittent-test-check.yml
@@ -121,7 +121,7 @@ jobs:
       - name: Execute tests
         run: |
           test_type=${{ needs.prepare-job.outputs.test_type }}
-          args="-DexcludedGroups=unhealthy,org.apache.ozone.test.UnhealthyTest"
+          args="-DexcludedGroups=unhealthy"
           if [ "$test_type" = "integration" ]; then
               args="$args -pl :ozone-integration-test,:mini-chaos-tests"
           fi
diff --git 
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/FlakyTest.java 
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/FlakyTest.java
deleted file mode 100644
index 83af64a085..0000000000
--- a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/FlakyTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ozone.test;
-
-/**
- * Interface to mark JUnit4 test classes or methods that exhibit intermittent
- * issues.  These are run separately from the normal tests in CI.  In case of
- * failure they may be repeated a few times.
- * Usage: <code>@Category(FlakyTest.class) @Flaky("HDDS-123")</code>
- */
-public interface FlakyTest {
-  // category marker
-}
diff --git 
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/SlowTest.java 
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/SlowTest.java
deleted file mode 100644
index 88913625a7..0000000000
--- a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/SlowTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ozone.test;
-
-/**
- * Interface to mark JUnit4 test classes or methods that take too much time.
- * These are excluded from CI runs for each commit, but can be run manually or
- * in scheduled runs.
- *
- * Usage: <code>@Category(SlowTest.class) @Slow("HDDS-123")</code>
- */
-public interface SlowTest {
-  // category marker
-}
diff --git 
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/UnhealthyTest.java 
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/UnhealthyTest.java
deleted file mode 100644
index c975461af4..0000000000
--- 
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/UnhealthyTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ozone.test;
-
-/**
- * Interface to mark JUnit4 test classes or methods that are unhealthy, which
- * means either they are unstable or inconsistent to run.
- * These are excluded from CI runs for each commit, but can be run manually or
- * in scheduled runs.
- *
- * Usage: <code>@Category(UnhealthyTest.class) @Unhealthy("HDDS-123")</code>
- */
-public interface UnhealthyTest {
-  // category marker
-}
diff --git a/hadoop-ozone/dev-support/checks/native.sh 
b/hadoop-ozone/dev-support/checks/native.sh
index a90dd30c20..dc66f923a6 100755
--- a/hadoop-ozone/dev-support/checks/native.sh
+++ b/hadoop-ozone/dev-support/checks/native.sh
@@ -20,5 +20,5 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 
&& pwd )"
 CHECK=native
 
 source "${DIR}/junit.sh" -Pnative -Drocks_tools_native \
-  -DexcludedGroups="unhealthy | org.apache.ozone.test.UnhealthyTest" \
+  -DexcludedGroups="unhealthy" \
   "$@"
diff --git a/hadoop-ozone/dev-support/checks/unit.sh 
b/hadoop-ozone/dev-support/checks/unit.sh
index 89d3be2666..d2d50c5ff0 100755
--- a/hadoop-ozone/dev-support/checks/unit.sh
+++ b/hadoop-ozone/dev-support/checks/unit.sh
@@ -18,5 +18,7 @@
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 CHECK=unit
-source "${DIR}/junit.sh" -pl \!:ozone-integration-test,\!:mini-chaos-tests \
--DexcludedGroups="native | unhealthy | org.apache.ozone.test.UnhealthyTest" 
"$@"
+source "${DIR}/junit.sh" \
+  -pl \!:ozone-integration-test,\!:mini-chaos-tests \
+  -DexcludedGroups="native | unhealthy" \
+  "$@"
diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerBalancerOperations.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerBalancerOperations.java
index 2334e3cf94..79ea4c593c 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerBalancerOperations.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerBalancerOperations.java
@@ -24,12 +24,10 @@ import 
org.apache.hadoop.hdds.scm.cli.ContainerOperationClient;
 import org.apache.hadoop.hdds.scm.client.ScmClient;
 import 
org.apache.hadoop.hdds.scm.container.placement.algorithms.SCMContainerPlacementCapacity;
 
-import org.apache.ozone.test.UnhealthyTest;
 import org.apache.ozone.test.tag.Unhealthy;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
-import org.junit.experimental.categories.Category;
 import org.junit.jupiter.api.Timeout;
 
 import java.util.Optional;
@@ -71,7 +69,7 @@ public class TestContainerBalancerOperations {
    * @throws Exception
    */
   @Test
-  @Category(UnhealthyTest.class) @Unhealthy("Since the cluster doesn't have " +
+  @Unhealthy("Since the cluster doesn't have " +
       "unbalanced nodes, ContainerBalancer stops before the assertion checks " 
+
       "whether balancer is running.")
   public void testContainerBalancerCLIOperations() throws Exception {
diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientForAclAuditLog.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientForAclAuditLog.java
index d2ace27dc3..2a5122341d 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientForAclAuditLog.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientForAclAuditLog.java
@@ -37,7 +37,6 @@ import org.apache.hadoop.ozone.security.acl.OzoneObj;
 import org.apache.hadoop.ozone.security.acl.OzoneObjInfo;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.ozone.test.GenericTestUtils;
-import org.apache.ozone.test.UnhealthyTest;
 import org.apache.ozone.test.tag.Unhealthy;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.Assertions;
@@ -45,7 +44,6 @@ import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.TestMethodOrder;
 import org.junit.jupiter.api.MethodOrderer;
 import org.junit.jupiter.api.Test;
-import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -77,7 +75,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
  */
 @NotThreadSafe
 @TestMethodOrder(MethodOrderer.MethodName.class)
-@Category(UnhealthyTest.class)
 @Unhealthy("Fix this after adding audit support for HA Acl code. This will " +
     "be fixed by HDDS-2038")
 public class TestOzoneRpcClientForAclAuditLog {
diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/freon/TestFreonWithDatanodeFastRestart.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/freon/TestFreonWithDatanodeFastRestart.java
index 7b0cc98219..12b00a0c8c 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/freon/TestFreonWithDatanodeFastRestart.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/freon/TestFreonWithDatanodeFastRestart.java
@@ -21,14 +21,12 @@ package org.apache.hadoop.ozone.freon;
 import org.apache.hadoop.hdds.conf.OzoneConfiguration;
 import org.apache.hadoop.ozone.MiniOzoneCluster;
 import org.apache.hadoop.ozone.container.TestHelper;
-import org.apache.ozone.test.UnhealthyTest;
 import org.apache.ozone.test.tag.Unhealthy;
 import org.apache.ratis.server.protocol.TermIndex;
 import org.apache.ratis.statemachine.StateMachine;
 import org.apache.ratis.statemachine.impl.SimpleStateMachineStorage;
 import org.apache.ratis.statemachine.impl.SingleFileSnapshotInfo;
 
-import org.junit.experimental.categories.Category;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeAll;
@@ -74,7 +72,7 @@ public class TestFreonWithDatanodeFastRestart {
   }
 
   @Test
-  @Category(UnhealthyTest.class) @Unhealthy("HDDS-1160")
+  @Unhealthy("HDDS-1160")
   public void testRestart() throws Exception {
     startFreon();
     StateMachine sm = getStateMachine();
diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestScmSafeMode.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestScmSafeMode.java
index 610b9c693c..d8e8580ae4 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestScmSafeMode.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestScmSafeMode.java
@@ -43,14 +43,12 @@ import org.apache.hadoop.ozone.client.OzoneVolume;
 import 
org.apache.hadoop.ozone.common.statemachine.InvalidStateTransitionException;
 import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
 import org.apache.ozone.test.GenericTestUtils;
-import org.apache.ozone.test.UnhealthyTest;
 import org.apache.ozone.test.tag.Unhealthy;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Timeout;
-import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -74,7 +72,7 @@ import static org.junit.jupiter.api.Assertions.fail;
  * Test Ozone Manager operation in distributed handler scenario.
  */
 @Timeout(300)
-@Category(UnhealthyTest.class) @Unhealthy("HDDS-3260")
+@Unhealthy("HDDS-3260")
 public class TestScmSafeMode {
 
   private static final Logger LOG = LoggerFactory
diff --git a/pom.xml b/pom.xml
index 2d3a9b2039..fe87dbcd46 100644
--- a/pom.xml
+++ b/pom.xml
@@ -251,7 +251,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xs
 
     <!-- Plugin versions and config -->
     <maven-surefire-plugin.argLine>-Xmx4096m 
-XX:+HeapDumpOnOutOfMemoryError</maven-surefire-plugin.argLine>
-    <unstable-test-groups>flaky | org.apache.ozone.test.FlakyTest | slow | 
org.apache.ozone.test.SlowTest | unhealthy | 
org.apache.ozone.test.UnhealthyTest</unstable-test-groups>
+    <unstable-test-groups>flaky | slow | unhealthy</unstable-test-groups>
     <maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>
     
<maven-surefire-report-plugin.version>${maven-surefire-plugin.version}</maven-surefire-report-plugin.version>
     
<maven-failsafe-plugin.version>${maven-surefire-plugin.version}</maven-failsafe-plugin.version>
@@ -2391,8 +2391,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xs
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-surefire-plugin</artifactId>
             <configuration>
-              <groups>flaky | org.apache.ozone.test.FlakyTest</groups>
-              <excludedGroups>slow | org.apache.ozone.test.SlowTest | 
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
+              <groups>flaky</groups>
+              <excludedGroups>slow | unhealthy</excludedGroups>
             </configuration>
           </plugin>
         </plugins>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to