Skip to content

Commit 0c38298

Browse files
committed
remove duplicate func
1 parent d4b573d commit 0c38298

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/test/java/com/aliyun/openservices/ots/integration/OTSClientTest.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void classAfter() {
3838
public void setup() throws Exception {
3939
LOG.info("Instance: " + ServiceSettings.load().getOTSInstanceName());
4040

41-
deleteTable(tableName);
41+
TestUtil.DeleteTable(ots, tableName);
4242
}
4343

4444
@Test
@@ -1052,7 +1052,7 @@ public void testBatchGetRow() throws Exception {
10521052
String[] tableNames = new String[TABLE_COUNT];
10531053
for (int i = 0; i < TABLE_COUNT; i++) {
10541054
tableNames[i] = tableName + "_" + i;
1055-
deleteTable(tableNames[i]);
1055+
TestUtil.DeleteTable(ots, tableNames[i]);
10561056
Thread.sleep(TABLE_OPERATION_INTERVAL_IN_MSEC);
10571057

10581058
tableMeta.setTableName(tableNames[i]);
@@ -1090,7 +1090,7 @@ public void testBatchGetRow() throws Exception {
10901090
}
10911091

10921092
for (int i = 0; i < TABLE_COUNT; i++) {
1093-
deleteTable(tableNames[i]);
1093+
TestUtil.DeleteTable(ots, tableNames[i]);
10941094
}
10951095
}
10961096

@@ -1110,7 +1110,7 @@ public void testBatchWriteRow() throws Exception {
11101110
String[] tableNames = new String[TABLE_COUNT];
11111111
for (int i = 0; i < TABLE_COUNT; i++) {
11121112
tableNames[i] = tableName + "_" + i;
1113-
deleteTable(tableNames[i]);
1113+
TestUtil.DeleteTable(ots, tableNames[i]);
11141114
Thread.sleep(TABLE_OPERATION_INTERVAL_IN_MSEC);
11151115

11161116
tableMeta.setTableName(tableNames[i]);
@@ -1364,7 +1364,7 @@ public void testBatchWriteRow() throws Exception {
13641364
}
13651365

13661366
for (int i = 0; i < TABLE_COUNT; i++) {
1367-
deleteTable(tableNames[i]);
1367+
TestUtil.DeleteTable(ots, tableNames[i]);
13681368
}
13691369
}
13701370

@@ -1539,11 +1539,4 @@ private void generateDataForTest(String tableName, int from, int to) {
15391539
writeRows(request);
15401540
}
15411541
}
1542-
1543-
private void deleteTable(String tableName) {
1544-
try {
1545-
DeleteTableRequest deleteTableRequest = new DeleteTableRequest(tableName);
1546-
ots.deleteTable(deleteTableRequest);
1547-
} catch (Exception ex) {;}
1548-
}
15491542
}

0 commit comments

Comments
 (0)