39
39
import org .apache .hadoop .hbase .client .Table ;
40
40
import org .apache .hadoop .hbase .client .TableDescriptor ;
41
41
import org .apache .hadoop .hbase .client .TableDescriptorBuilder ;
42
+ import org .apache .hadoop .hbase .master .procedure .ServerCrashProcedure ;
42
43
import org .apache .hadoop .hbase .net .Address ;
43
- import org .apache .hadoop .hbase .testclassification .MediumTests ;
44
+ import org .apache .hadoop .hbase .testclassification .LargeTests ;
44
45
import org .apache .hadoop .hbase .util .Bytes ;
45
46
import org .apache .hadoop .hbase .util .JVMClusterUtil ;
46
47
import org .apache .hadoop .hbase .util .VersionInfo ;
56
57
57
58
import org .apache .hbase .thirdparty .com .google .common .collect .Sets ;
58
59
59
- @ Category ({ MediumTests .class })
60
+ @ Category ({ LargeTests .class })
60
61
public class TestRSGroupsKillRS extends TestRSGroupsBase {
61
62
62
63
@ ClassRule
@@ -237,12 +238,12 @@ public void testLowerMetaGroupVersion() throws Exception{
237
238
addGroup (groupName , groupRSCount );
238
239
239
240
// move hbase:meta to meta_group
240
- tableName = TableName .META_TABLE_NAME ;
241
241
Set <TableName > toAddTables = new HashSet <>();
242
- toAddTables .add (tableName );
242
+ toAddTables .add (TableName . META_TABLE_NAME );
243
243
rsGroupAdmin .moveTables (toAddTables , groupName );
244
- assertTrue (rsGroupAdmin .getRSGroupInfo (groupName ).getTables ().contains (tableName ));
245
- TEST_UTIL .waitTableAvailable (tableName , 30000 );
244
+ assertTrue (
245
+ rsGroupAdmin .getRSGroupInfo (groupName ).getTables ().contains (TableName .META_TABLE_NAME ));
246
+ TEST_UTIL .waitUntilAllRegionsAssigned (TableName .META_TABLE_NAME , 30000 );
246
247
247
248
// restart the regionserver in meta_group, and lower its version
248
249
String originVersion = "" ;
@@ -268,7 +269,9 @@ public void testLowerMetaGroupVersion() throws Exception{
268
269
assertTrue (VersionInfo .compareVersion (originVersion ,
269
270
master .getRegionServerVersion (getServerName (servers .iterator ().next ()))) > 0 );
270
271
LOG .debug ("wait for META assigned..." );
271
- TEST_UTIL .waitTableAvailable (tableName , 30000 );
272
+ TEST_UTIL .waitFor (60000 , () -> !TEST_UTIL .getHBaseCluster ().getMaster ().getProcedures ().stream ()
273
+ .filter (p -> (p instanceof ServerCrashProcedure )).findAny ().isPresent ());
274
+ TEST_UTIL .waitUntilAllRegionsAssigned (TableName .META_TABLE_NAME , 60000 );
272
275
}
273
276
274
277
private static void setFinalStatic (Field field , Object newValue ) throws Exception {
0 commit comments