Skip to content

Commit ce6bfb2

Browse files
committed
fix tableExists case
1 parent a03e342 commit ce6bfb2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/test/java/com/alipay/oceanbase/hbase/OHTableAdminInterfaceTest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ public void testAdminGetRegionMetrics() throws Exception {
633633
long thrStart = System.currentTimeMillis();
634634
regionMetrics = admin.getRegionMetrics(null, TableName.valueOf(tablegroup2));
635635
long thrCost = System.currentTimeMillis() - thrStart;
636-
System.out.println("task: " + taskId + ", get region metrics time usage: " + thrCost + "ms, tablegroup: " + tablegroup1);
636+
System.out.println("task: " + taskId + ", get region metrics time usage: " + thrCost + "ms, tablegroup: " + tablegroup2);
637637
if (regionMetrics.size() != 3) {
638638
throw new ObTableGetException(
639639
"the number of region metrics does not match the number of tablets, the number of region metrics: " + regionMetrics.size());
@@ -1624,12 +1624,7 @@ public void testHbaseDDLException() throws Exception {
16241624
}
16251625

16261626
// 11. check table exists from an uncreated namespace
1627-
try {
1628-
admin.tableExists(TableName.valueOf("n101:t1"));
1629-
fail();
1630-
} catch (Exception e) {
1631-
Assert.assertEquals(e.getClass(), NamespaceNotFoundException.class);
1632-
}
1627+
Assert.assertFalse(admin.tableExists(TableName.valueOf("n101:t1")));
16331628

16341629
}
16351630

0 commit comments

Comments
 (0)