Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Dec 22, 2023

Conversation

david1859168
Copy link
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
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

Copy link
Contributor

@adoroszlai adoroszlai left a comment

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.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

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:master Dec 22, 2023
25 checks passed
@adoroszlai
Copy link
Contributor

Thanks again @david1859168 for the patch.

Sign up for free to 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.

2 participants