4646import org .apache .hadoop .mapred .Reporter ;
4747import org .apache .hadoop .mapred .RunningJob ;
4848import org .apache .hadoop .mapred .lib .NullOutputFormat ;
49+ import org .junit .jupiter .api .BeforeEach ;
4950import org .junit .jupiter .api .Disabled ;
5051import org .junit .jupiter .api .Tag ;
5152import org .junit .jupiter .api .Test ;
@@ -60,6 +61,13 @@ public class TestTableSnapshotInputFormat extends TableSnapshotInputFormatTestBa
6061 private static final String COLUMNS =
6162 Bytes .toString (FAMILIES [0 ]) + " " + Bytes .toString (FAMILIES [1 ]);
6263
64+ private String methodName ;
65+
66+ @ BeforeEach
67+ public void beforeEach (TestInfo testInfo ) {
68+ methodName = testInfo .getTestMethod ().get ().getName ();
69+ }
70+
6371 @ Override
6472 protected byte [] getStartRow () {
6573 return aaa ;
@@ -99,8 +107,8 @@ public void close() {
99107 }
100108
101109 @ Test
102- public void testInitTableSnapshotMapperJobConfig (TestInfo testInfo ) throws Exception {
103- final TableName tableName = TableName .valueOf (testInfo . getTestMethod (). get (). getName () );
110+ public void testInitTableSnapshotMapperJobConfig () throws Exception {
111+ final TableName tableName = TableName .valueOf (methodName );
104112 String snapshotName = "foo" ;
105113
106114 try {
@@ -160,7 +168,7 @@ public void testRestoreSnapshotDoesNotCreateBackRefLinksInit(TableName tableName
160168 @ Override
161169 protected void testWithMockedMapReduce (HBaseTestingUtil util , String snapshotName , int numRegions ,
162170 int numSplitsPerRegion , int expectedNumSplits , boolean setLocalityEnabledTo ) throws Exception {
163- final TableName tableName = TableName .valueOf ("testWithMockedMapReduce" );
171+ final TableName tableName = TableName .valueOf (methodName );
164172 try {
165173 createTableAndSnapshot (util , tableName , snapshotName , getStartRow (), getEndRow (), numRegions );
166174
0 commit comments