Skip to content

HDDS-9503. Migrate simple misc. integration tests to JUnit5 - #5854

Merged
adoroszlai merged 8 commits into
apache:masterfrom
david1859168:HDDS-9503
Dec 22, 2023
Merged

HDDS-9503. Migrate simple misc. integration tests to JUnit5#5854
adoroszlai merged 8 commits into
apache:masterfrom
david1859168:HDDS-9503

Conversation

@david1859168

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

HDDS-9503. Migrate simple misc. integration tests to JUnit5

Please describe your PR in detail:
Migrate the following test classes from Junit4 to JUnit5 by following the parent JIRA [HDDS-6729. Migrate tests to JUnit5]
hadoop-ozone/fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone/TestMiniChaosOzoneCluster.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/storage/TestCommitWatcher.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokens.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokensCLI.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerBalancerOperations.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerOperations.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerStateMachineIdempotency.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestMiniOzoneOMHACluster.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/debug/TestLeaseRecoverer.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/fsck/TestContainerMapper.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestContainerReportWithKeys.java
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestSecretKeysApi.java

How was this patch tested?

Tested in Intellij.

@adoroszlai

Copy link
Copy Markdown
Contributor

Thanks @david1859168 for working on this.

There are some conflicts with current master branch, which need to be resolved manually. Please merge from master, resolve the conflicts, then push to your fork again.

Also, checkstyle reports the following problems:

hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokens.java
53: Unused import - org.apache.ozone.test.JUnit5AwareTimeout.
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerOperations.java
32: Using the '.*' form of import should be avoided - org.junit.jupiter.api.*.
53: 'class def modifier' has incorrect indentation level 1, expected level should be 0.
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestMiniOzoneOMHACluster.java
24: Using the '.*' form of import should be avoided - org.junit.jupiter.api.*.
27: Unused import - java.io.IOException.
48: Variable 'exception' must be private and have accessor methods.
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokensCLI.java
36: Using the '.*' form of import should be avoided - org.junit.jupiter.api.*.
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestSecretKeysApi.java
42: Unused import - org.apache.ozone.test.JUnit5AwareTimeout.
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestContainerReportWithKeys.java
40: Using the '.*' form of import should be avoided - org.junit.jupiter.api.*.
42: Unused import - org.apache.ozone.test.JUnit5AwareTimeout.
69: Variable 'exception' must be private and have accessor methods.
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerStateMachineIdempotency.java
40: Using the '.*' form of import should be avoided - org.junit.jupiter.api.*.

https://github.com/david1859168/ozone/actions/runs/7296598719/job/19884620249

You can run checkstyle locally by:

hadoop-ozone/dev-support/checks/checkstyle.sh

@adoroszlaiadoroszlai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @david1859168 for updating the patch.

@adoroszlaiadoroszlai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @david1859168 for updating the patch again.

@adoroszlai
adoroszlai merged commit b33768e into apache:masterDec 22, 2023
@adoroszlai

Copy link
Copy Markdown
Contributor

Thanks again @david1859168 for the patch.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@david1859168@adoroszlai@david1859168-design