Skip to content

Commit 14168af

Browse files
committed
fix tests
1 parent ed5b6ba commit 14168af

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SerialReplicationSourceWALReader.java

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

2020
import java.io.IOException;
2121
import java.util.NavigableMap;
22-
2322
import org.apache.hadoop.conf.Configuration;
2423
import org.apache.hadoop.fs.FileSystem;
2524
import org.apache.hadoop.fs.Path;
@@ -29,11 +28,12 @@
2928
import org.apache.hadoop.hbase.replication.WALEntryFilter;
3029
import org.apache.hadoop.hbase.util.Bytes;
3130
import org.apache.hadoop.hbase.wal.WAL.Entry;
32-
import org.apache.hbase.thirdparty.org.apache.commons.collections4.MapUtils;
3331
import org.apache.yetus.audience.InterfaceAudience;
3432
import org.slf4j.Logger;
3533
import org.slf4j.LoggerFactory;
3634

35+
import org.apache.hbase.thirdparty.org.apache.commons.collections4.MapUtils;
36+
3737
/**
3838
* WAL reader for a serial replication peer.
3939
*/

hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationWALEntryFilters.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
package org.apache.hadoop.hbase.replication;
1919

2020
import static org.junit.Assert.assertNull;
21-
import static org.junit.Assert.assertTrue;
2221
import static org.mockito.Mockito.mock;
2322
import static org.mockito.Mockito.when;
2423

@@ -107,15 +106,12 @@ public void testScopeWALEntryFilter() {
107106
Entry userEntryEmpty = createEntry(null);
108107

109108
// no scopes
110-
// now we will not filter out entries without a replication scope since serial replication still
111-
// need the sequence id, but the cells will all be filtered out.
112-
assertTrue(filter.filter(userEntry).getEdit().isEmpty());
109+
assertNull(filter.filter(userEntry));
113110

114111
// empty scopes
115-
// ditto
116112
TreeMap<byte[], Integer> scopes = new TreeMap<>(Bytes.BYTES_COMPARATOR);
117113
userEntry = createEntry(scopes, a, b);
118-
assertTrue(filter.filter(userEntry).getEdit().isEmpty());
114+
assertNull(filter.filter(userEntry));
119115

120116
// different scope
121117
scopes = new TreeMap<>(Bytes.BYTES_COMPARATOR);

0 commit comments

Comments
 (0)