aajisaka commented on code in PR #4771:
URL: https://github.com/apache/hadoop/pull/4771#discussion_r950711773
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestEntityGroupFSTimelineStore.java:
##########
@@ -173,7 +178,7 @@ public void setup() throws Exception {
}
store = new EntityGroupFSTimelineStore();
- if (currTestName.getMethodName().contains("Plugin")) {
+ if (testInfo.getDisplayName().contains("Plugin")) {
Review Comment:
We need only the method name, so `testInfo.getTestMethod().getName()` seems
more informative.
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestEntityGroupFSTimelineStore.java:
##########
@@ -118,12 +117,18 @@ public class TestEntityGroupFSTimelineStore extends
TimelineStoreTestUtils {
private EntityGroupFSTimelineStore store;
private TimelineEntity entityNew;
- @Rule
- public TestName currTestName = new TestName();
+ @Test
+ void getTestInfo(TestInfo testInfo) { // Automatically injected
+ System.out.println(testInfo.getDisplayName());
+ System.out.println(testInfo.getTestMethod());
+ System.out.println(testInfo.getTestClass());
+ System.out.println(testInfo.getTags());
+ }
+
Review Comment:
I don't think it's necessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]