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 eadbcff84d HDDS-9299. Mark
TestOmSnapshot#testDayWeekMonthSnapshotCreationAndExpiration as slow (#5437)
eadbcff84d is described below
commit eadbcff84d40d05ce2f3d269b9ddf4fc3a68091b
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Mon Oct 16 20:34:55 2023 +0200
HDDS-9299. Mark
TestOmSnapshot#testDayWeekMonthSnapshotCreationAndExpiration as slow (#5437)
---
.../ozone/test/{UnhealthyTest.java => SlowTest.java} | 9 ++++++---
.../java/org/apache/ozone/test/UnhealthyTest.java | 6 +++++-
.../main/java/org/apache/ozone/test/tag/Flaky.java | 7 ++++---
.../main/java/org/apache/ozone/test/tag/Native.java | 2 +-
.../main/java/org/apache/ozone/test/tag/Slow.java | 6 ++++--
.../java/org/apache/ozone/test/tag/Unhealthy.java | 7 ++++---
.../java/org/apache/ozone/test/tag/package-info.java | 2 +-
.../org/apache/hadoop/ozone/om/TestOmSnapshot.java | 3 +++
pom.xml | 20 ++++++++++----------
9 files changed, 38 insertions(+), 24 deletions(-)
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/SlowTest.java
similarity index 75%
copy from
hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/UnhealthyTest.java
copy to hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/SlowTest.java
index c0719bdd2e..88913625a7 100644
---
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/SlowTest.java
@@ -18,9 +18,12 @@
package org.apache.ozone.test;
/**
- * Interface to mark test classes or methods that are unhealthy which
- * means either they are unstable or inconsistent to run.
+ * 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 UnhealthyTest {
+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
index c0719bdd2e..c975461af4 100644
---
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
@@ -18,8 +18,12 @@
package org.apache.ozone.test;
/**
- * Interface to mark test classes or methods that are unhealthy which
+ * 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-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Flaky.java
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Flaky.java
index 6b86d58c44..ac63fc9d5b 100644
--- a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Flaky.java
+++ b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Flaky.java
@@ -25,9 +25,10 @@ import java.lang.annotation.Target;
import org.junit.jupiter.api.Tag;
/**
- * Annotation to mark test classes or methods with some intermittent failures.
- * These are handled separately from the normal tests. (Not required to pass,
- * may be repeated automatically, etc.)
+ * Annotation to mark JUnit5 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>@Flaky("HDDS-123")</code>
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
diff --git
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Native.java
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Native.java
index d11f0fdb9e..1aeb476cb8 100644
--- a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Native.java
+++ b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Native.java
@@ -25,7 +25,7 @@ import java.lang.annotation.Target;
import org.junit.jupiter.api.Tag;
/**
- * Annotation to mark test classes that require native libraries.
+ * Annotation to mark JUnit5 test classes that require native libraries.
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
diff --git
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Slow.java
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Slow.java
index 51d312e222..30c4a0a48f 100644
--- a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Slow.java
+++ b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Slow.java
@@ -25,8 +25,10 @@ import java.lang.annotation.Target;
import org.junit.jupiter.api.Tag;
/**
- * Annotation to mark test classes or methods that take too much time.
- * These are excluded from CI runs for each commit and run periodically.
+ * Annotation to mark JUnit5 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>@Slow("HDDS-123")</code>
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
diff --git
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Unhealthy.java
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Unhealthy.java
index 981c2e15a2..f64d3b741e 100644
---
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Unhealthy.java
+++
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/Unhealthy.java
@@ -25,10 +25,11 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * Annotation to mark test classes or methods that are unhealthy which
+ * Annotation to mark JUnit5 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 and should run only
- * during nightly or other scheduled runs.
+ * These are excluded from CI runs for each commit, but can be run manually or
+ * in scheduled runs.
+ * Usage: <code>@Unhealthy("HDDS-123")</code>
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
diff --git
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/package-info.java
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/package-info.java
index d5a60ecef6..e056ba234a 100644
---
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/package-info.java
+++
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/tag/package-info.java
@@ -19,4 +19,4 @@
/**
* Tags are annotations for grouping tests.
*/
-package org.apache.ozone.test;
+package org.apache.ozone.test.tag;
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java
index d19f7fdcf3..409de11d07 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java
@@ -74,7 +74,9 @@ import org.apache.hadoop.ozone.upgrade.UpgradeFinalizer;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.ozone.test.GenericTestUtils;
+import org.apache.ozone.test.SlowTest;
import org.apache.ozone.test.UnhealthyTest;
+import org.apache.ozone.test.tag.Slow;
import org.apache.ozone.test.tag.Unhealthy;
import org.jetbrains.annotations.NotNull;
import org.junit.Assert;
@@ -2122,6 +2124,7 @@ public class TestOmSnapshot {
}
@Test
+ @Category(SlowTest.class) @Slow("HDDS-9299")
public void testDayWeekMonthSnapshotCreationAndExpiration() throws Exception
{
String volumeA = "vol-a-" + RandomStringUtils.randomNumeric(5);
String bucketA = "buc-a-" + RandomStringUtils.randomNumeric(5);
diff --git a/pom.xml b/pom.xml
index b36c2e7536..8e5d2006ad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2216,7 +2216,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<includes>
<include>org.apache.hadoop.ozone.client.**</include>
</includes>
- <excludedGroups>flaky | slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>flaky | slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2233,7 +2233,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<includes>
<include>org.apache.hadoop.ozone.om.**</include>
</includes>
- <excludedGroups>flaky | slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>flaky | slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2250,7 +2250,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<includes>
<include>org.apache.hadoop.ozone.scm.**</include>
</includes>
- <excludedGroups>flaky | slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>flaky | slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2267,7 +2267,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<includes>
<include>org.apache.hadoop.fs.ozone.contract.**</include>
</includes>
- <excludedGroups>flaky | slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>flaky | slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2287,7 +2287,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<excludes>
<exclude>org.apache.hadoop.fs.ozone.contract.**</exclude>
</excludes>
- <excludedGroups>flaky | slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>flaky | slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2304,7 +2304,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<includes>
<include>org.apache.hadoop.hdds.**</include>
</includes>
- <excludedGroups>flaky | slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>flaky | slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2329,7 +2329,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<exclude>org.apache.hadoop.ozone.scm.**</exclude>
<exclude>org.apache.hadoop.ozone.shell.**</exclude>
</excludes>
- <excludedGroups>flaky | slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>flaky | slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2348,7 +2348,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<include>org.apache.hadoop.ozone.freon.**</include>
<include>org.apache.hadoop.ozone.shell.**</include>
</includes>
- <excludedGroups>flaky | slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>flaky | slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2362,7 +2362,7 @@ 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>
- <excludedGroups>flaky | slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>flaky | slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2377,7 +2377,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<groups>flaky</groups>
- <excludedGroups>slow | unhealthy |
org.apache.ozone.test.UnhealthyTest</excludedGroups>
+ <excludedGroups>slow | org.apache.ozone.test.SlowTest |
unhealthy | org.apache.ozone.test.UnhealthyTest</excludedGroups>
</configuration>
</plugin>
</plugins>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]