Skip to content

Commit 2056b28

Browse files
committed
fix
1 parent 3a271d7 commit 2056b28

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import java.util.Map;
3333
import org.apache.hadoop.hbase.Cell;
3434
import org.apache.hadoop.hbase.CompareOperator;
35-
import org.apache.hadoop.hbase.HBaseClassTestRule;
3635
import org.apache.hadoop.hbase.HBaseConfiguration;
3736
import org.apache.hadoop.hbase.HBaseTestingUtil;
3837
import org.apache.hadoop.hbase.NotServingRegionException;
@@ -74,9 +73,6 @@
7473
@Tag(LargeTests.TAG)
7574
public class TestTableInputFormat {
7675

77-
public static final HBaseClassTestRule CLASS_RULE =
78-
HBaseClassTestRule.forClass(TestTableInputFormat.class);
79-
8076
private static final Logger LOG = LoggerFactory.getLogger(TestTableInputFormat.class);
8177

8278
private final static HBaseTestingUtil UTIL = new HBaseTestingUtil();

hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import org.apache.hadoop.fs.Path;
4040
import org.apache.hadoop.hbase.Cell;
4141
import org.apache.hadoop.hbase.CellUtil;
42-
import org.apache.hadoop.hbase.HBaseClassTestRule;
4342
import org.apache.hadoop.hbase.HBaseTestingUtil;
4443
import org.apache.hadoop.hbase.HConstants;
4544
import org.apache.hadoop.hbase.KeyValue;
@@ -83,9 +82,6 @@
8382
@Tag(LargeTests.TAG)
8483
public class TestWALPlayer {
8584

86-
public static final HBaseClassTestRule CLASS_RULE =
87-
HBaseClassTestRule.forClass(TestWALPlayer.class);
88-
8985
private static final HBaseTestingUtil TEST_UTIL = new HBaseTestingUtil();
9086
private static SingleProcessHBaseCluster cluster;
9187
private static Path rootDir;

hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/replication/TestVerifyReplicationRecompareRunnable.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import static org.junit.jupiter.api.Assertions.assertEquals;
2121
import static org.mockito.ArgumentMatchers.any;
22+
import static org.mockito.Mockito.lenient;
2223
import static org.mockito.Mockito.when;
2324

2425
import java.io.IOException;
@@ -77,7 +78,7 @@ public void setUp() {
7778
for (VerifyReplication.Verifier.Counters counter : VerifyReplication.Verifier.Counters
7879
.values()) {
7980
Counter emptyCounter = new GenericCounter(counter.name(), counter.name());
80-
when(context.getCounter(counter)).thenReturn(emptyCounter);
81+
lenient().when(context.getCounter(counter)).thenReturn(emptyCounter);
8182
}
8283
}
8384

@@ -131,7 +132,7 @@ public void itRecomparesBadRow() throws IOException {
131132
@Test
132133
public void itHandlesExceptionOnRecompare() throws IOException {
133134
when(sourceTable.get(any(Get.class))).thenThrow(new IOException("Error!"));
134-
when(replicatedTable.get(any(Get.class))).thenReturn(genResult(5));
135+
lenient().when(replicatedTable.get(any(Get.class))).thenReturn(genResult(5));
135136

136137
VerifyReplicationRecompareRunnable runnable = new VerifyReplicationRecompareRunnable(context,
137138
genResult(5), null, VerifyReplication.Verifier.Counters.ONLY_IN_SOURCE_TABLE_ROWS, "",

0 commit comments

Comments
 (0)