File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
src/test/java/com/aliyun/openservices/ots/integration Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,14 @@ public static void classAfter() {
4343
4444 @ Before
4545 public void setup () throws Exception {
46- OTSHelper .deleteAllTable (ots );
4746 LOG .info ("Instance: " + ServiceSettings .load ().getOTSInstanceName ());
4847
49- ListTableResult r = ots .listTable ();
50-
51- for (String table : r .getTableNames ()) {
52- DeleteTableRequest deleteTableRequest = new DeleteTableRequest (table );
48+ try {
49+ DeleteTableRequest deleteTableRequest = new DeleteTableRequest (tableName );
5350 ots .deleteTable (deleteTableRequest );
54- LOG .info ("Delete table: " + table );
51+ Thread .sleep (5000 );
52+ } catch (Exception ex ) {;}
5553
56- Thread .sleep (1000 );
57- }
5854
5955 TableMeta tableMeta = new TableMeta (tableName );
6056 tableMeta .addPrimaryKeyColumn ("PK0" , PrimaryKeyType .INTEGER );
Original file line number Diff line number Diff line change @@ -1048,6 +1048,12 @@ public void testBatchGetRow() throws Exception {
10481048 String [] tableNames = new String [TABLE_COUNT ];
10491049 for (int i = 0 ; i < TABLE_COUNT ; i ++) {
10501050 tableNames [i ] = tableName + "_" + i ;
1051+ try {
1052+ DeleteTableRequest deleteTableRequest = new DeleteTableRequest (tableNames [i ]);
1053+ ots .deleteTable (deleteTableRequest );
1054+ Thread .sleep (TABLE_OPERATION_INTERVAL_IN_MSEC );
1055+ } catch (Exception ex ) {;}
1056+
10511057 tableMeta .setTableName (tableNames [i ]);
10521058 ctRequest .setTableMeta (tableMeta );
10531059 ots .createTable (ctRequest );
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ public static void classAfter() {
3636
3737 @ Before
3838 public void setup () throws Exception {
39- OTSHelper .deleteAllTable (ots );
4039 LOG .info ("Instance: " + ServiceSettings .load ().getOTSInstanceName ());
4140
4241 try {
You can’t perform that action at this time.
0 commit comments