HBASE-25546 PerfTestCompactionPolicies is failing because of NPE (#2921)

Adds mock for getRegionInfo which was missing earlier.

Signed-off-by: Pankaj Kumar<pankajkumar@apache.org>
This commit is contained in:
robin7roy 2021-02-03 10:34:34 +05:30 committed by GitHub
parent a04ea7ea44
commit d6d67d1e9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,7 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.RegionInfoBuilder;
import org.apache.hadoop.hbase.regionserver.HStore;
import org.apache.hadoop.hbase.regionserver.HStoreFile;
import org.apache.hadoop.hbase.regionserver.StoreConfigInformation;
@ -197,6 +198,7 @@ public class PerfTestCompactionPolicies extends MockStoreFileGenerator {
HStore s = mock(HStore.class);
when(s.getStoreFileTtl()).thenReturn(Long.MAX_VALUE);
when(s.getBlockingFileCount()).thenReturn(7L);
when(s.getRegionInfo()).thenReturn(RegionInfoBuilder.FIRST_META_REGIONINFO);
return s;
}