@Test public void testWithRegions() throws IOException, ServiceException { HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(name.getMethodName())); List<RegionInfo> regions = Lists.newArrayList( RegionInfoBuilder.newBuilder(htd.getTableName()) .setStartKey(Bytes.toBytes("a")) .setEndKey(Bytes.toBytes("d")) .build(), RegionInfoBuilder.newBuilder(htd.getTableName()) .setStartKey(Bytes.toBytes("d")) .setEndKey(Bytes.toBytes("z")) .build() ); Mockito.doReturn(ResponseConverter.buildGetOnlineRegionResponse( regions)).when(rpcServices).getOnlineRegion((RpcController)Mockito.any(), (GetOnlineRegionRequest)Mockito.any()); new RSStatusTmpl().render(new StringWriter(), rs); }
@Test public void testWithRegions() throws IOException, ServiceException { HTableDescriptor htd = new HTableDescriptor(TableName.valueOf("mytable")); List<HRegionInfo> regions = Lists.newArrayList( new HRegionInfo(htd.getTableName(), Bytes.toBytes("a"), Bytes.toBytes("d")), new HRegionInfo(htd.getTableName(), Bytes.toBytes("d"), Bytes.toBytes("z")) ); Mockito.doReturn(ResponseConverter.buildGetOnlineRegionResponse( regions)).when(rpcServices).getOnlineRegion((RpcController)Mockito.any(), (GetOnlineRegionRequest)Mockito.any()); new RSStatusTmpl().render(new StringWriter(), rs); }
@Test public void testWithRegions() throws IOException { HTableDescriptor htd = new HTableDescriptor("mytable"); List<HRegionInfo> regions = Lists.newArrayList( new HRegionInfo(htd.getName(), Bytes.toBytes("a"), Bytes.toBytes("d")), new HRegionInfo(htd.getName(), Bytes.toBytes("d"), Bytes.toBytes("z")) ); Mockito.doReturn(regions).when(rs).getOnlineRegions(); new RSStatusTmpl().render(new StringWriter(), rs); }
@Test public void testWithRegions() throws IOException, ServiceException { HTableDescriptor htd = new HTableDescriptor(TableName.valueOf("mytable")); List<HRegionInfo> regions = Lists.newArrayList( new HRegionInfo(htd.getTableName(), Bytes.toBytes("a"), Bytes.toBytes("d")), new HRegionInfo(htd.getTableName(), Bytes.toBytes("d"), Bytes.toBytes("z")) ); Mockito.doReturn(ResponseConverter.buildGetOnlineRegionResponse( regions)).when(rs).getOnlineRegion((RpcController)Mockito.any(), (GetOnlineRegionRequest)Mockito.any()); new RSStatusTmpl().render(new StringWriter(), rs); }
@Test public void testWithRegions() throws IOException, ServiceException { HTableDescriptor htd = new HTableDescriptor("mytable"); List<HRegionInfo> regions = Lists.newArrayList( new HRegionInfo(htd.getName(), Bytes.toBytes("a"), Bytes.toBytes("d")), new HRegionInfo(htd.getName(), Bytes.toBytes("d"), Bytes.toBytes("z")) ); Mockito.doReturn(ResponseConverter.buildGetOnlineRegionResponse( regions)).when(rs).getOnlineRegion((RpcController)Mockito.any(), (GetOnlineRegionRequest)Mockito.any()); new RSStatusTmpl().render(new StringWriter(), rs); }
@Test public void testBasic() throws IOException, ServiceException { new RSStatusTmpl().render(new StringWriter(), rs); }
@Test public void testBasic() throws IOException { new RSStatusTmpl().render(new StringWriter(), rs); }