Index: src/test/java/org/apache/hadoop/hbase/avro/TestAvroServer.java =================================================================== --- src/test/java/org/apache/hadoop/hbase/avro/TestAvroServer.java (revision 1222388) +++ src/test/java/org/apache/hadoop/hbase/avro/TestAvroServer.java (working copy) @@ -127,12 +127,15 @@ impl.modifyTable(tableAname, tableA); // It can take a while for the change to take effect. Wait here a while. - while(impl.describeTable(tableAname).maxFileSize == oldMaxFileSize) { - Threads.sleep(100); + int sleepTime = 100; + long stop = System.currentTimeMillis() + 5000; + while(impl.describeTable(tableAname).maxFileSize != tableA.maxFileSize && + System.currentTimeMillis() < stop) { + Threads.sleep(sleepTime); } - assertTrue(impl.describeTable(tableAname).maxFileSize == 123456L); - assertEquals(123456L, (long) impl.describeTable(tableAname).maxFileSize); + assertEquals((long) tableA.maxFileSize, + (long) impl.describeTable(tableAname).maxFileSize); /* DISABLED FOR NOW TILL WE HAVE BETTER DISABLE/ENABLE impl.enableTable(tableAname); assertTrue(impl.isTableEnabled(tableAname));