DomGarguilo commented on a change in pull request #2427:
URL: https://github.com/apache/accumulo/pull/2427#discussion_r792745084



##########
File path: 
core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloMultiTableInputFormatTest.java
##########
@@ -29,24 +29,20 @@
 import org.apache.accumulo.core.util.Pair;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapred.JobConf;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestName;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInfo;
 
 @Deprecated(since = "2.0.0")
 public class AccumuloMultiTableInputFormatTest {
 
-  @Rule
-  public TestName testName = new TestName();
-
   /**
    * Verify {@link org.apache.accumulo.core.client.mapreduce.InputTableConfig} 
objects get correctly
    * serialized in the JobContext.
    */
   @Test
-  public void testTableQueryConfigSerialization() {
-    String table1Name = testName.getMethodName() + "1";
-    String table2Name = testName.getMethodName() + "2";
+  public void testTableQueryConfigSerialization(TestInfo testInfo) {
+    String table1Name = testInfo.getDisplayName() + "1";

Review comment:
       Good point. I was looking for a good replacement for `.getMethodName()` 
and from some quick testing after your suggestions, it looks like 
`testInfo.getTestMethod().orElseThrow(IllegalStateException::new).getName()` 
might be a suitable replacement.




-- 
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]


Reply via email to