This is an automated email from the ASF dual-hosted git repository.
erose 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 9f6ac2fc37 HDDS-9242. Merge unit and integration checks into a
combined one (#6199)
9f6ac2fc37 is described below
commit 9f6ac2fc37d36675e11d94e63933488053ba80a6
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Fri Mar 29 01:17:06 2024 +0100
HDDS-9242. Merge unit and integration checks into a combined one (#6199)
---
.github/workflows/ci.yml | 4 +-
dev-support/ci/selective_ci_checks.bats | 53 +++++++++---------
dev-support/ci/selective_ci_checks.sh | 38 +------------
.../dev-support/checks/_mvn_unit_report.sh | 2 +-
hadoop-ozone/dev-support/checks/integration.sh | 2 +-
hadoop-ozone/dev-support/checks/junit.sh | 6 +-
hadoop-ozone/dev-support/checks/unit.sh | 2 -
.../om/{ => snapshot}/TestOmSnapshotDisabled.java | 3 +-
.../TestOmSnapshotDisabledRestart.java | 3 +-
.../{ => snapshot}/TestOmSnapshotFileSystem.java | 7 ++-
.../TestOmSnapshotFileSystemFso.java | 2 +-
.../TestOmSnapshotFileSystemLegacy.java | 2 +-
.../{ => snapshot}/TestOzoneManagerHASnapshot.java | 5 +-
.../TestSnapshotBackgroundServices.java | 7 ++-
.../TestSnapshotDeletingService.java | 8 ++-
.../TestSnapshotDirectoryCleaningService.java | 3 +-
.../ozone/om/{ => snapshot}/TestSnapshotChain.java | 5 +-
.../ozone/om/{ => snapshot}/TestSnapshotInfo.java | 4 +-
.../om/{ => snapshot}/TestSstFilteringService.java | 11 +++-
pom.xml | 65 +++++++++++++++++-----
20 files changed, 129 insertions(+), 103 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b1df2254c5..e4c9431caa 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -434,12 +434,14 @@ jobs:
matrix:
profile:
- client
- - contract
+ - container
- filesystem
- hdds
- om
- ozone
+ - recon
- shell
+ - snapshot
- flaky
fail-fast: false
steps:
diff --git a/dev-support/ci/selective_ci_checks.bats
b/dev-support/ci/selective_ci_checks.bats
index a21a4c387b..69ca1d9f99 100644
--- a/dev-support/ci/selective_ci_checks.bats
+++ b/dev-support/ci/selective_ci_checks.bats
@@ -108,7 +108,7 @@ load bats-assert/load.bash
@test "integration and unit: java change" {
run dev-support/ci/selective_ci_checks.sh 9aebf6e25
- assert_output -p
'basic-checks=["rat","author","checkstyle","findbugs","unit"]'
+ assert_output -p 'basic-checks=["rat","author","checkstyle","findbugs"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
@@ -120,7 +120,7 @@ load bats-assert/load.bash
@test "integration and unit: script change" {
run dev-support/ci/selective_ci_checks.sh c6850484f
- assert_output -p 'basic-checks=["rat","bats","unit"]'
+ assert_output -p 'basic-checks=["rat","bats"]'
assert_output -p needs-build=false
assert_output -p needs-compile=false
assert_output -p needs-compose-tests=false
@@ -132,7 +132,7 @@ load bats-assert/load.bash
@test "script change including junit.sh" {
run dev-support/ci/selective_ci_checks.sh 66093e52c6
- assert_output -p 'basic-checks=["rat","bats","checkstyle","findbugs","unit"]'
+ assert_output -p 'basic-checks=["rat","bats","checkstyle","findbugs"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
@@ -144,19 +144,19 @@ load bats-assert/load.bash
@test "unit only" {
run dev-support/ci/selective_ci_checks.sh 1dd1d0ba3
- assert_output -p
'basic-checks=["rat","author","checkstyle","findbugs","unit"]'
+ assert_output -p 'basic-checks=["rat","author","checkstyle","findbugs"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
- assert_output -p needs-integration-tests=false
+ assert_output -p needs-integration-tests=true
assert_output -p needs-kubernetes-tests=false
}
@test "unit helper" {
run dev-support/ci/selective_ci_checks.sh 88383d1d5
- assert_output -p
'basic-checks=["rat","author","checkstyle","findbugs","unit"]'
+ assert_output -p 'basic-checks=["rat","author","checkstyle","findbugs"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=false
@@ -189,20 +189,17 @@ load bats-assert/load.bash
assert_output -p needs-kubernetes-tests=false
}
-# disabled, because this test fails if
-#
hadoop-hdds/rocksdb-checkpoint-differ/src/test/java/org/apache/ozone/rocksdb/util/TestManagedSstFileReader.java
-# is not present in the current tree (i.e. if file is renamed, moved or
deleted)
-#@test "native test in other module" {
-# run dev-support/ci/selective_ci_checks.sh 7d01cc14a6
-#
-# assert_output -p
'basic-checks=["rat","author","checkstyle","findbugs","native","unit"]'
-# assert_output -p needs-build=true
-# assert_output -p needs-compile=true
-# assert_output -p needs-compose-tests=false
-# assert_output -p needs-dependency-check=false
-# assert_output -p needs-integration-tests=false
-# assert_output -p needs-kubernetes-tests=false
-#}
+@test "native test in other module" {
+ run dev-support/ci/selective_ci_checks.sh 822c0dee1a
+
+ assert_output -p
'basic-checks=["rat","author","checkstyle","findbugs","native"]'
+ assert_output -p needs-build=true
+ assert_output -p needs-compile=true
+ assert_output -p needs-compose-tests=false
+ assert_output -p needs-dependency-check=false
+ assert_output -p needs-integration-tests=false
+ assert_output -p needs-kubernetes-tests=false
+}
@test "kubernetes only" {
run dev-support/ci/selective_ci_checks.sh 5336bb9bd
@@ -231,7 +228,7 @@ load bats-assert/load.bash
@test "main/java change" {
run dev-support/ci/selective_ci_checks.sh 86a771dfe
- assert_output -p
'basic-checks=["rat","author","checkstyle","findbugs","unit"]'
+ assert_output -p 'basic-checks=["rat","author","checkstyle","findbugs"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
@@ -243,7 +240,7 @@ load bats-assert/load.bash
@test "..../java change" {
run dev-support/ci/selective_ci_checks.sh 01c616536
- assert_output -p
'basic-checks=["rat","author","checkstyle","findbugs","unit"]'
+ assert_output -p 'basic-checks=["rat","author","checkstyle","findbugs"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
@@ -255,7 +252,7 @@ load bats-assert/load.bash
@test "java and compose change" {
run dev-support/ci/selective_ci_checks.sh d0f0f806e
- assert_output -p
'basic-checks=["rat","author","checkstyle","findbugs","unit"]'
+ assert_output -p 'basic-checks=["rat","author","checkstyle","findbugs"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
@@ -267,7 +264,7 @@ load bats-assert/load.bash
@test "java and docs change" {
run dev-support/ci/selective_ci_checks.sh 2c0adac26
- assert_output -p
'basic-checks=["rat","author","checkstyle","docs","findbugs","unit"]'
+ assert_output -p
'basic-checks=["rat","author","checkstyle","docs","findbugs"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
@@ -279,7 +276,7 @@ load bats-assert/load.bash
@test "pom change" {
run dev-support/ci/selective_ci_checks.sh 9129424a9
- assert_output -p 'basic-checks=["rat","checkstyle","findbugs","unit"]'
+ assert_output -p 'basic-checks=["rat","checkstyle","findbugs"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
@@ -291,7 +288,7 @@ load bats-assert/load.bash
@test "CI lib change" {
run dev-support/ci/selective_ci_checks.sh ceb79acaa
- assert_output -p
'basic-checks=["author","bats","checkstyle","docs","findbugs","native","rat","unit"]'
+ assert_output -p
'basic-checks=["author","bats","checkstyle","docs","findbugs","native","rat"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
@@ -303,7 +300,7 @@ load bats-assert/load.bash
@test "CI workflow change" {
run dev-support/ci/selective_ci_checks.sh 90a8d7c01
- assert_output -p
'basic-checks=["author","bats","checkstyle","docs","findbugs","native","rat","unit"]'
+ assert_output -p
'basic-checks=["author","bats","checkstyle","docs","findbugs","native","rat"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
@@ -328,7 +325,7 @@ load bats-assert/load.bash
@test "CI workflow change (ci.yaml)" {
run dev-support/ci/selective_ci_checks.sh 90fd5f2adc
- assert_output -p
'basic-checks=["author","bats","checkstyle","docs","findbugs","native","rat","unit"]'
+ assert_output -p
'basic-checks=["author","bats","checkstyle","docs","findbugs","native","rat"]'
assert_output -p needs-build=true
assert_output -p needs-compile=true
assert_output -p needs-compose-tests=true
diff --git a/dev-support/ci/selective_ci_checks.sh
b/dev-support/ci/selective_ci_checks.sh
index 3cfeaa4a6e..bb0faa962e 100755
--- a/dev-support/ci/selective_ci_checks.sh
+++ b/dev-support/ci/selective_ci_checks.sh
@@ -263,18 +263,10 @@ function get_count_integration_files() {
"^hadoop-ozone/integration-test"
"^hadoop-ozone/fault-injection-test/mini-chaos-tests"
"src/test/java"
+ "src/test/resources"
)
- # Ozone's unit test naming convention: Test*.java
- # The following makes this filter ignore all tests except those in
- # integration-test and fault-injection-test.
- # Directories starting with `i` under hadoop-ozone need to be listed
- # explicitly, other subdirectories are captured by the second item.
local ignore_array=(
- "^hadoop-hdds/.*/src/test/java/.*/Test.*.java"
- "^hadoop-ozone/[a-eghj-z].*/src/test/java/.*/Test.*.java"
- "^hadoop-ozone/insight/src/test/java/.*/Test.*.java"
- "^hadoop-ozone/interface-client/src/test/java/.*/Test.*.java"
- "^hadoop-ozone/interface-storage/src/test/java/.*/Test.*.java"
+ $(grep -Flr 'org.apache.ozone.test.tag.Native'
hadoop-ozone/integration-test)
)
filter_changed_files true
COUNT_INTEGRATION_CHANGED_FILES=${match_count}
@@ -456,29 +448,6 @@ function check_needs_native() {
start_end::group_end
}
-function check_needs_unit_test() {
- start_end::group_start "Check if unit test is needed"
- local pattern_array=(
- "^hadoop-ozone/dev-support/checks/_mvn_unit_report.sh"
- "^hadoop-ozone/dev-support/checks/unit.sh"
- "^hadoop-ozone/dev-support/checks/junit.sh"
- "src/test/java"
- "src/test/resources"
- )
- local ignore_array=(
- "^hadoop-ozone/dist"
- "^hadoop-ozone/fault-injection-test/mini-chaos-tests"
- "^hadoop-ozone/integration-test"
- )
- filter_changed_files true
-
- if [[ ${match_count} != "0" ]]; then
- add_basic_check unit
- fi
-
- start_end::group_end
-}
-
# Counts other files which do not need to trigger any functional test
# (i.e. no compose/integration/kubernetes)
function get_count_misc_files() {
@@ -502,6 +471,7 @@ function get_count_misc_files() {
"^hadoop-ozone/dev-support/checks/_mvn_unit_report.sh"
"^hadoop-ozone/dev-support/checks/acceptance.sh"
"^hadoop-ozone/dev-support/checks/integration.sh"
+ "^hadoop-ozone/dev-support/checks/junit.sh"
"^hadoop-ozone/dev-support/checks/kubernetes.sh"
)
filter_changed_files true
@@ -534,7 +504,6 @@ function calculate_test_types_to_run() {
compose_tests_needed=true
integration_tests_needed=true
kubernetes_tests_needed=true
- add_basic_check unit
else
echo "All ${COUNT_ALL_CHANGED_FILES} changed files are known to be
handled by specific checks."
echo
@@ -614,6 +583,5 @@ check_needs_dependency
check_needs_docs
check_needs_findbugs
check_needs_native
-check_needs_unit_test
calculate_test_types_to_run
set_outputs
diff --git a/hadoop-ozone/dev-support/checks/_mvn_unit_report.sh
b/hadoop-ozone/dev-support/checks/_mvn_unit_report.sh
index 5139dddcd8..4fca7bb6aa 100755
--- a/hadoop-ozone/dev-support/checks/_mvn_unit_report.sh
+++ b/hadoop-ozone/dev-support/checks/_mvn_unit_report.sh
@@ -35,7 +35,7 @@ find "." -not -path '*/iteration*' -name 'TEST*.xml' -print0 \
> "${tempfile}"
if [[ "${CHECK:-unit}" == "integration" ]]; then
- find "." -not -path '*/iteration*' -name '*-output.txt' -print0 \
+ find hadoop-ozone/integration-test -not -path '*/iteration*' -name
'*-output.txt' -print0 \
| xargs -n1 -0 "grep" -l -E "not closed properly|was not shutdown
properly" \
| awk -F/ '{sub("-output.txt",""); print $NF}' \
>> "${tempfile}"
diff --git a/hadoop-ozone/dev-support/checks/integration.sh
b/hadoop-ozone/dev-support/checks/integration.sh
index a8142efb0f..72f8b2ddb8 100755
--- a/hadoop-ozone/dev-support/checks/integration.sh
+++ b/hadoop-ozone/dev-support/checks/integration.sh
@@ -16,4 +16,4 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
CHECK=integration
-source "${DIR}/junit.sh" -pl :ozone-integration-test,:mini-chaos-tests "$@"
+source "${DIR}/junit.sh" "$@"
diff --git a/hadoop-ozone/dev-support/checks/junit.sh
b/hadoop-ozone/dev-support/checks/junit.sh
index 768a1f32a3..9d2efd8ac6 100755
--- a/hadoop-ozone/dev-support/checks/junit.sh
+++ b/hadoop-ozone/dev-support/checks/junit.sh
@@ -50,10 +50,8 @@ if [[ -f
hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh ]]; then
ozone_java_setup
fi
-if [[ "${CHECK}" == "integration" ]] || [[ ${ITERATIONS} -gt 1 ]]; then
- if [[ ${OZONE_REPO_CACHED} == "false" ]]; then
- mvn ${MAVEN_OPTIONS} -DskipTests clean install
- fi
+if [[ ${ITERATIONS} -gt 1 ]] && [[ ${OZONE_REPO_CACHED} == "false" ]]; then
+ mvn ${MAVEN_OPTIONS} -DskipTests clean install
fi
REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/${CHECK}"}
diff --git a/hadoop-ozone/dev-support/checks/unit.sh
b/hadoop-ozone/dev-support/checks/unit.sh
index d2d50c5ff0..8e540fa9e1 100755
--- a/hadoop-ozone/dev-support/checks/unit.sh
+++ b/hadoop-ozone/dev-support/checks/unit.sh
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-#checks:unit
-
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
CHECK=unit
source "${DIR}/junit.sh" \
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotDisabled.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotDisabled.java
similarity index 97%
rename from
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotDisabled.java
rename to
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotDisabled.java
index cb49d273e7..95a24b8ca9 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotDisabled.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotDisabled.java
@@ -15,7 +15,7 @@
* the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
@@ -26,6 +26,7 @@ import org.apache.hadoop.ozone.MiniOzoneHAClusterImpl;
import org.apache.hadoop.ozone.client.ObjectStore;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.client.OzoneVolume;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
import org.apache.hadoop.ozone.om.exceptions.OMException;
import org.apache.hadoop.ozone.om.helpers.BucketLayout;
import org.junit.jupiter.api.AfterAll;
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotDisabledRestart.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotDisabledRestart.java
similarity index 97%
rename from
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotDisabledRestart.java
rename to
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotDisabledRestart.java
index 7f325f6c3e..91ad9eb8fe 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotDisabledRestart.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotDisabledRestart.java
@@ -15,7 +15,7 @@
* the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
@@ -25,6 +25,7 @@ import org.apache.hadoop.ozone.MiniOzoneHAClusterImpl;
import org.apache.hadoop.ozone.client.ObjectStore;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.client.OzoneVolume;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
import org.apache.ozone.test.tag.Unhealthy;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotFileSystem.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotFileSystem.java
similarity index 99%
rename from
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotFileSystem.java
rename to
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotFileSystem.java
index 055ddeb20c..42b43fa03a 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotFileSystem.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotFileSystem.java
@@ -15,7 +15,7 @@
* the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
@@ -41,12 +41,15 @@ import org.apache.hadoop.ozone.client.OzoneKey;
import org.apache.hadoop.ozone.client.OzoneVolume;
import org.apache.hadoop.ozone.client.io.OzoneInputStream;
import org.apache.hadoop.ozone.client.io.OzoneOutputStream;
+import org.apache.hadoop.ozone.om.KeyManagerImpl;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
+import org.apache.hadoop.ozone.om.OmSnapshotManager;
+import org.apache.hadoop.ozone.om.OzoneManager;
import org.apache.hadoop.ozone.om.exceptions.OMException;
import org.apache.hadoop.ozone.om.helpers.OmKeyArgs;
import org.apache.hadoop.ozone.om.helpers.OpenKeySession;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol;
-import org.apache.hadoop.ozone.om.snapshot.TestOmSnapshot;
import org.apache.ozone.test.GenericTestUtils;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotFileSystemFso.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotFileSystemFso.java
similarity index 95%
rename from
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotFileSystemFso.java
rename to
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotFileSystemFso.java
index 66d3951602..47bdd8f3bd 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotFileSystemFso.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotFileSystemFso.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.junit.jupiter.api.Timeout;
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotFileSystemLegacy.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotFileSystemLegacy.java
similarity index 95%
rename from
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotFileSystemLegacy.java
rename to
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotFileSystemLegacy.java
index 86682b2cbc..b8d81c31cf 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotFileSystemLegacy.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshotFileSystemLegacy.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.junit.jupiter.api.Timeout;
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHASnapshot.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneManagerHASnapshot.java
similarity index 97%
rename from
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHASnapshot.java
rename to
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneManagerHASnapshot.java
index 14826a1861..341b5b78c6 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHASnapshot.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneManagerHASnapshot.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
@@ -30,6 +30,9 @@ import org.apache.hadoop.ozone.client.ObjectStore;
import org.apache.hadoop.ozone.client.OzoneBucket;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.client.io.OzoneOutputStream;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
+import org.apache.hadoop.ozone.om.OmMetadataManagerImpl;
+import org.apache.hadoop.ozone.om.OzoneManager;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse;
import org.junit.jupiter.api.AfterAll;
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotBackgroundServices.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotBackgroundServices.java
similarity index 99%
rename from
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotBackgroundServices.java
rename to
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotBackgroundServices.java
index 54ee0ed537..2f7e1bd5a9 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotBackgroundServices.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotBackgroundServices.java
@@ -14,7 +14,7 @@
* License for the specific language governing permissions and limitations
under
* the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.conf.StorageUnit;
@@ -34,13 +34,16 @@ import org.apache.hadoop.ozone.client.OzoneClientFactory;
import org.apache.hadoop.ozone.client.OzoneVolume;
import org.apache.hadoop.ozone.client.VolumeArgs;
import org.apache.hadoop.ozone.client.io.OzoneInputStream;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
+import org.apache.hadoop.ozone.om.OmFailoverProxyUtil;
+import org.apache.hadoop.ozone.om.OmSnapshot;
+import org.apache.hadoop.ozone.om.OzoneManager;
import org.apache.hadoop.ozone.om.exceptions.OMLeaderNotReadyException;
import org.apache.hadoop.ozone.om.exceptions.OMNotLeaderException;
import org.apache.hadoop.ozone.om.helpers.BucketLayout;
import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.ozone.om.ratis.OzoneManagerRatisServerConfig;
-import org.apache.hadoop.ozone.om.snapshot.ReferenceCounted;
import org.apache.hadoop.ozone.snapshot.SnapshotDiffReportOzone;
import org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse;
import org.apache.ozone.compaction.log.CompactionLogEntry;
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotDeletingService.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDeletingService.java
similarity index 98%
rename from
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotDeletingService.java
rename to
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDeletingService.java
index d4bf911676..1c98ce89af 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotDeletingService.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDeletingService.java
@@ -17,7 +17,7 @@
*
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.apache.hadoop.hdds.client.ReplicationFactor;
import org.apache.hadoop.hdds.client.ReplicationType;
@@ -32,13 +32,17 @@ import org.apache.hadoop.ozone.TestDataUtil;
import org.apache.hadoop.ozone.client.BucketArgs;
import org.apache.hadoop.ozone.client.OzoneBucket;
import org.apache.hadoop.ozone.client.OzoneClient;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
+import org.apache.hadoop.ozone.om.OMMetadataManager;
+import org.apache.hadoop.ozone.om.OmMetadataManagerImpl;
+import org.apache.hadoop.ozone.om.OmSnapshot;
+import org.apache.hadoop.ozone.om.OzoneManager;
import org.apache.hadoop.ozone.om.helpers.BucketLayout;
import org.apache.hadoop.ozone.om.helpers.OmDirectoryInfo;
import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
import org.apache.hadoop.ozone.om.helpers.RepeatedOmKeyInfo;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.ozone.om.service.SnapshotDeletingService;
-import org.apache.hadoop.ozone.om.snapshot.ReferenceCounted;
import org.apache.ozone.test.GenericTestUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotDirectoryCleaningService.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDirectoryCleaningService.java
similarity index 99%
rename from
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotDirectoryCleaningService.java
rename to
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDirectoryCleaningService.java
index 893e248d88..fac6764767 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotDirectoryCleaningService.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDirectoryCleaningService.java
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
import org.apache.hadoop.fs.FSDataOutputStream;
@@ -31,6 +31,7 @@ import org.apache.hadoop.ozone.OzoneConsts;
import org.apache.hadoop.ozone.TestDataUtil;
import org.apache.hadoop.ozone.client.OzoneBucket;
import org.apache.hadoop.ozone.client.OzoneClient;
+import org.apache.hadoop.ozone.om.OMConfigKeys;
import org.apache.hadoop.ozone.om.helpers.BucketLayout;
import org.apache.hadoop.ozone.om.helpers.OmDirectoryInfo;
import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
diff --git
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotChain.java
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotChain.java
similarity index 98%
rename from
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotChain.java
rename to
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotChain.java
index 1821b6f9af..c5ae809718 100644
---
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotChain.java
+++
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotChain.java
@@ -15,11 +15,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import com.google.common.collect.ImmutableMap;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.utils.db.Table;
+import org.apache.hadoop.ozone.om.OMMetadataManager;
+import org.apache.hadoop.ozone.om.OmMetadataManagerImpl;
+import org.apache.hadoop.ozone.om.SnapshotChainManager;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.util.Time;
import org.junit.jupiter.api.BeforeEach;
diff --git
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotInfo.java
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotInfo.java
similarity index 96%
rename from
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotInfo.java
rename to
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotInfo.java
index 48f366371a..dc00433e17 100644
---
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSnapshotInfo.java
+++
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotInfo.java
@@ -16,10 +16,12 @@
* limitations under the License.
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.utils.db.Table;
+import org.apache.hadoop.ozone.om.OMMetadataManager;
+import org.apache.hadoop.ozone.om.OmMetadataManagerImpl;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo.SnapshotStatus;
import org.apache.hadoop.util.Time;
diff --git
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSstFilteringService.java
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSstFilteringService.java
similarity index 97%
rename from
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSstFilteringService.java
rename to
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSstFilteringService.java
index 25fdaa9082..72bca07557 100644
---
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestSstFilteringService.java
+++
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSstFilteringService.java
@@ -16,7 +16,7 @@
* limitations under the License.
*
*/
-package org.apache.hadoop.ozone.om;
+package org.apache.hadoop.ozone.om.snapshot;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.hadoop.hdds.client.StandaloneReplicationConfig;
@@ -26,6 +26,14 @@ import
org.apache.hadoop.hdds.scm.container.common.helpers.ExcludeList;
import org.apache.hadoop.hdds.utils.db.DBProfile;
import org.apache.hadoop.hdds.utils.db.RDBStore;
import org.apache.hadoop.ozone.lock.BootstrapStateHandler;
+import org.apache.hadoop.ozone.om.KeyManager;
+import org.apache.hadoop.ozone.om.OMMetadataManager;
+import org.apache.hadoop.ozone.om.OmMetadataManagerImpl;
+import org.apache.hadoop.ozone.om.OmSnapshot;
+import org.apache.hadoop.ozone.om.OmSnapshotManager;
+import org.apache.hadoop.ozone.om.OmTestManagers;
+import org.apache.hadoop.ozone.om.OzoneManager;
+import org.apache.hadoop.ozone.om.SstFilteringService;
import org.apache.hadoop.ozone.om.helpers.OmBucketInfo;
import org.apache.hadoop.ozone.om.helpers.OmKeyArgs;
import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
@@ -34,7 +42,6 @@ import org.apache.hadoop.ozone.om.helpers.OpenKeySession;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol;
import org.apache.hadoop.ozone.om.request.OMRequestTestUtils;
-import org.apache.hadoop.ozone.om.snapshot.ReferenceCounted;
import org.apache.ratis.util.ExitUtils;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
diff --git a/pom.xml b/pom.xml
index bb153966f0..a72917f748 100644
--- a/pom.xml
+++ b/pom.xml
@@ -106,8 +106,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<jetty.version>9.4.53.v20231009</jetty.version>
<java.dev.jna.version>5.2.0</java.dev.jna.version>
<curator.version>4.2.0</curator.version>
- <test.exclude>_</test.exclude>
- <test.exclude.pattern>_</test.exclude.pattern>
<!-- number of threads/forks to use when running tests in parallel, see
parallel-tests profile -->
<testsThreadCount>4</testsThreadCount>
@@ -246,7 +244,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>
<maven-surefire-plugin.argLineAccessArgs></maven-surefire-plugin.argLineAccessArgs>
- <unstable-test-groups>flaky | slow | unhealthy</unstable-test-groups>
+ <unstable-test-groups>flaky | native | slow |
unhealthy</unstable-test-groups>
<maven-surefire-plugin.version>3.0.0-M4</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>
@@ -1701,11 +1699,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<includes>
<include>**/Test*.java</include>
</includes>
- <excludes>
- <exclude>**/${test.exclude}.java</exclude>
- <exclude>${test.exclude.pattern}</exclude>
- <exclude>**/Test*$*.java</exclude>
- </excludes>
</configuration>
</plugin>
<plugin>
@@ -1965,6 +1958,24 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
</plugins>
</build>
</profile>
+ <profile>
+ <id>container</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org.apache.hadoop.hdds.scm.container.**</include>
+ <include>org.apache.hadoop.ozone.container.**</include>
+ </includes>
+ <excludedGroups>${unstable-test-groups}</excludedGroups>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<profile>
<id>om</id>
<build>
@@ -1976,6 +1987,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<includes>
<include>org.apache.hadoop.ozone.om.**</include>
</includes>
+ <excludes>
+ <exclude>org.apache.hadoop.ozone.om.snapshot.**</exclude>
+ </excludes>
<excludedGroups>${unstable-test-groups}</excludedGroups>
</configuration>
</plugin>
@@ -1983,7 +1997,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
</build>
</profile>
<profile>
- <id>contract</id>
+ <id>snapshot</id>
<build>
<plugins>
<plugin>
@@ -1991,7 +2005,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
- <include>org.apache.hadoop.fs.ozone.contract.**</include>
+ <include>org.apache.hadoop.ozone.om.snapshot.**</include>
</includes>
<excludedGroups>${unstable-test-groups}</excludedGroups>
</configuration>
@@ -2008,11 +2022,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
- <include>org.apache.hadoop.fs.ozone.**</include>
+ <include>org.apache.hadoop.fs.**</include>
</includes>
- <excludes>
- <exclude>org.apache.hadoop.fs.ozone.contract.**</exclude>
- </excludes>
<excludedGroups>${unstable-test-groups}</excludedGroups>
</configuration>
</plugin>
@@ -2030,6 +2041,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<includes>
<include>org.apache.hadoop.hdds.**</include>
</includes>
+ <excludes>
+ <exclude>org.apache.hadoop.hdds.scm.container.**</exclude>
+ </excludes>
<excludedGroups>${unstable-test-groups}</excludedGroups>
</configuration>
</plugin>
@@ -2045,13 +2059,16 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
+ <include>org.apache.ozone.**</include>
<include>org.apache.hadoop.ozone.**</include>
</includes>
<excludes>
<exclude>org.apache.hadoop.ozone.client.**</exclude>
+ <exclude>org.apache.hadoop.ozone.container.**</exclude>
<exclude>org.apache.hadoop.ozone.debug.**</exclude>
<exclude>org.apache.hadoop.ozone.freon.**</exclude>
<exclude>org.apache.hadoop.ozone.om.**</exclude>
+ <exclude>org.apache.hadoop.ozone.recon.**</exclude>
<exclude>org.apache.hadoop.ozone.shell.**</exclude>
</excludes>
<excludedGroups>${unstable-test-groups}</excludedGroups>
@@ -2060,6 +2077,23 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
</plugins>
</build>
</profile>
+ <profile>
+ <id>recon</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org.apache.hadoop.ozone.recon.**</include>
+ </includes>
+ <excludedGroups>${unstable-test-groups}</excludedGroups>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<profile>
<id>shell</id>
<build>
@@ -2102,7 +2136,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</excludedGroups>
+ <excludedGroups>native | slow | unhealthy</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -2117,6 +2151,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<groups>native</groups>
+ <excludedGroups>slow | unhealthy</excludedGroups>
</configuration>
</plugin>
</plugins>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]