Skip to content

Commit d77e90c

Browse files
committed
HBASE-22296 Remove TestFromClientSide.testGetStartEndKeysWithRegionReplicas
1 parent fe7cf10 commit d77e90c

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6353,43 +6353,6 @@ private static Pair<byte[][], byte[][]> getStartEndKeys(List<RegionLocations> re
63536353
return new Pair<>(startKeyList, endKeyList);
63546354
}
63556355

6356-
@Test
6357-
public void testGetStartEndKeysWithRegionReplicas() throws IOException {
6358-
HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(name.getMethodName()));
6359-
HColumnDescriptor fam = new HColumnDescriptor(FAMILY);
6360-
htd.addFamily(fam);
6361-
byte[][] KEYS = HBaseTestingUtility.KEYS_FOR_HBA_CREATE_TABLE;
6362-
Admin admin = TEST_UTIL.getAdmin();
6363-
admin.createTable(htd, KEYS);
6364-
List<RegionInfo> regions = admin.getRegions(htd.getTableName());
6365-
6366-
HRegionLocator locator =
6367-
(HRegionLocator) admin.getConnection().getRegionLocator(htd.getTableName());
6368-
for (int regionReplication = 1; regionReplication < 4; regionReplication++) {
6369-
List<RegionLocations> regionLocations = new ArrayList<>();
6370-
6371-
// mock region locations coming from meta with multiple replicas
6372-
for (RegionInfo region : regions) {
6373-
HRegionLocation[] arr = new HRegionLocation[regionReplication];
6374-
for (int i = 0; i < arr.length; i++) {
6375-
arr[i] = new HRegionLocation(RegionReplicaUtil.getRegionInfoForReplica(region, i), null);
6376-
}
6377-
regionLocations.add(new RegionLocations(arr));
6378-
}
6379-
6380-
Pair<byte[][], byte[][]> startEndKeys = getStartEndKeys(regionLocations);
6381-
6382-
assertEquals(KEYS.length + 1, startEndKeys.getFirst().length);
6383-
6384-
for (int i = 0; i < KEYS.length + 1; i++) {
6385-
byte[] startKey = i == 0 ? HConstants.EMPTY_START_ROW : KEYS[i - 1];
6386-
byte[] endKey = i == KEYS.length ? HConstants.EMPTY_END_ROW : KEYS[i];
6387-
assertArrayEquals(startKey, startEndKeys.getFirst()[i]);
6388-
assertArrayEquals(endKey, startEndKeys.getSecond()[i]);
6389-
}
6390-
}
6391-
}
6392-
63936356
@Test
63946357
public void testFilterAllRecords() throws IOException {
63956358
Scan scan = new Scan();

0 commit comments

Comments
 (0)