-
Notifications
You must be signed in to change notification settings - Fork 9.1k
YARN-11864. [JDK17] Remove Usage of org.hamcrest in Unit Tests. #7987
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
Conversation
🎊 +1 overall
This message was automatically generated. |
@cnauroth Could you help me review this PR? Thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1,LGTM @slfan1989
@szetszwo Could you please review this PR? Thank you very much! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 the change looks good.
Let's also remove the hamcrest 1.3 dependency? "mvn package" works without it.
diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml
index f0086331bd3..d659cf34737 100644
--- a/hadoop-project/pom.xml
+++ b/hadoop-project/pom.xml
@@ -2002,11 +2002,6 @@
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <version>1.3</version>
- </dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
diff --git a/hadoop-tools/hadoop-aws/pom.xml b/hadoop-tools/hadoop-aws/pom.xml
index e675c50f241..3a0c0f53cf5 100644
--- a/hadoop-tools/hadoop-aws/pom.xml
+++ b/hadoop-tools/hadoop-aws/pom.xml
@@ -573,11 +573,6 @@
<artifactId>hadoop-minikdc</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <scope>test</scope>
- </dependency>
<!-- Used to create SSL certs for a secure Keystore -->
<dependency>
<groupId>org.bouncycastle</groupId>
diff --git a/hadoop-tools/hadoop-azure/pom.xml b/hadoop-tools/hadoop-azure/pom.xml
index 58ac82736bd..5ce3a584413 100644
--- a/hadoop-tools/hadoop-azure/pom.xml
+++ b/hadoop-tools/hadoop-azure/pom.xml
@@ -339,11 +339,6 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
diff --git a/hadoop-tools/hadoop-distcp/pom.xml b/hadoop-tools/hadoop-distcp/pom.xml
index 4c1b36d7662..a90713b1e10 100644
--- a/hadoop-tools/hadoop-distcp/pom.xml
+++ b/hadoop-tools/hadoop-distcp/pom.xml
@@ -109,12 +109,6 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <version>1.3</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 pending pre-submit. Thank you!
🎊 +1 overall
This message was automatically generated. |
@slfan1989 , thanks for working on this! @cnauroth , thanks for reviewing this! |
@szetszwo @cnauroth Thank you very much for helping to review the code! |
Description of PR
JIRA: YARN-11864. [JDK17] Remove Usage of org.hamcrest in Unit Tests.
How was this patch tested?
This pr removes the usage of org.hamcrest in the unit tests. All assertions that previously relied on the Hamcrest library have been refactored to use AssertJ for a more modern, fluent, and readable testing style.
Changes include:
Replaced Hamcrest assertions (assertThat) with AssertJ equivalents.
Removed any imports or references to org.hamcrest in the unit tests.
This update enhances the maintainability and consistency of our test suite by using AssertJ, which is better aligned with our current testing practices.
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?