@Test public void testFailingGetTableAvailable() throws Exception { testTimedOutCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.isTableAvailable(Bytes.toBytes("TestTable")); } }); }
@Test public void testFailingGetTableList() throws Exception { testTimedOutGetCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.getTableList(); } }); }
private void testTimedOutGetCall(CallExecutor callExecutor) throws Exception { testTimedOutCall(callExecutor); verify(client, times(RETRIES)).get(anyString(), anyString()); }
@Test public void testFailingGetClusterStatus() throws Exception { testTimedOutGetCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.getClusterStatus(); } }); }
@Test @SuppressWarnings("deprecation") public void testFailingCreateTable() throws Exception { testTimedOutCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.createTable(new HTableDescriptor(TableName.valueOf("TestTable"))); } }); verify(client, times(RETRIES)).put(anyString(), anyString(), any()); }
@Test public void testFailingGetClusterVersion() throws Exception { testTimedOutGetCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.getClusterVersion(); } }); }
@Test public void testFailingDeleteTable() throws Exception { testTimedOutCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.deleteTable("TestTable"); } }); verify(client, times(RETRIES)).delete(anyString()); }
@Test public void testFailingGetRestVersion() throws Exception { testTimedOutGetCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.getRestVersion(); } }); }
@Test public void testFailingGetTableAvailable() throws Exception { testTimedOutCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.isTableAvailable(Bytes.toBytes("TestTable")); } }); }
@Test public void testFailingGetClusterStatus() throws Exception { testTimedOutGetCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.getClusterStatus(); } }); }
private void testTimedOutGetCall(CallExecutor callExecutor) throws Exception { testTimedOutCall(callExecutor); verify(client, times(RETRIES)).get(anyString(), anyString()); }
@Test public void testFailingGetRestVersion() throws Exception { testTimedOutGetCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.getRestVersion(); } }); }
@Test @SuppressWarnings("deprecation") public void testFailingCreateTable() throws Exception { testTimedOutCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.createTable(new HTableDescriptor(TableName.valueOf("TestTable"))); } }); verify(client, times(RETRIES)).put(anyString(), anyString(), any()); }
@Test public void testFailingGetClusterVersion() throws Exception { testTimedOutGetCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.getClusterVersion(); } }); }
@Test public void testFailingDeleteTable() throws Exception { testTimedOutCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.deleteTable("TestTable"); } }); verify(client, times(RETRIES)).delete(anyString()); }
@Test public void testFailingGetTableList() throws Exception { testTimedOutGetCall(new CallExecutor() { @Override public void run() throws Exception { remoteAdmin.getTableList(); } }); }