-
Notifications
You must be signed in to change notification settings - Fork 1k
RANGER-4848: Migrate Ranger Junit tests to junit5 #768
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
base: master
Are you sure you want to change the base?
Conversation
c36a3fe to
a01c16b
Compare
| cp.preSetTableQuota(mctx, tname, mock(GlobalQuotaSettings.class)); | ||
| cp.preSetNamespaceQuota(mctx, "ns", mock(GlobalQuotaSettings.class)); | ||
| Assertions.assertTrue(true); | ||
| try { |
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.
These additional changes are unrelated to the JUnit 4 to JUnit 5 migration. Wouldn’t it be better to handle them separately and keep this pull request focused solely on the changes required for the JUnit 5 migration?
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.
Working on it
| Mockito.when(mgrMock.getHBaseConnection(Mockito.eq("svc"), Mockito.eq("type"), Mockito.any())) | ||
| .thenReturn(client); | ||
| Mockito.when(client.getTableList(Mockito.eq("tab.*".replaceAll("\\*", ".\\*")), | ||
| Mockito.when(client.getTableList(Mockito.eq("tab.*"), |
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.
same as my previous comment.
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.
Working on it
vyommani
left a comment
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.
Overall, the changes look good to me. That said, I notice quite a few test modifications that aren't directly tied to the JUnit 4 to JUnit 5 migration. I think these additional test improvements are substantial enough to warrant their own separate PR. I'm not entirely sure how much effort it would take to split them out while keeping the migration changes intact in this PR.
Currently I am trying to keep the previous junit 5 version or lower(if needed in any module) and same maven-surefire-plugin version, trying to remove reference of junit 4 as well; |
a01c16b to
f6be842
Compare
| <dependency> | ||
| <groupId>org.junit.jupiter</groupId> | ||
| <artifactId>junit-jupiter</artifactId> | ||
| <version>5.7.2</version> |
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.
5.7.2 => ${junit.jupiter.version}
| <dependency> | ||
| <groupId>org.junit.platform</groupId> | ||
| <artifactId>junit-platform-commons</artifactId> | ||
| <version>1.7.2</version> |
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.
I suggest replacing 1.7.2 with a property like ${junit.platform.version}
What changes were proposed in this pull request?
Ranger junit test code migration from junit 4 to junit 5; some of the the test code were already moved to junit 5 via RANGER-4559 and RANGER-4730
How was this patch tested?
mvn clean install