diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestMetaMigrationConvertingToPB.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestMetaMigrationConvertingToPB.java index c252e1d..e735e9e 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestMetaMigrationConvertingToPB.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestMetaMigrationConvertingToPB.java @@ -31,6 +31,7 @@ import junit.framework.Assert; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.commons.logging.impl.Log4JLogger; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.FileUtil; @@ -47,9 +48,13 @@ import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; +import org.apache.hadoop.hbase.client.ScannerCallable; +import org.apache.hadoop.hbase.ipc.HBaseClient; +import org.apache.hadoop.hbase.ipc.HBaseServer; import org.apache.hadoop.hbase.master.HMaster; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.io.DataOutputBuffer; +import org.apache.log4j.Level; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -89,6 +94,11 @@ public class TestMetaMigrationConvertingToPB { @BeforeClass public static void setUpBeforeClass() throws Exception { + // Adding rpc logging so that we will spill the buffer up on jenkins and we'll be able to see + // what is going on -- this test fails with no output from time to time. + ((Log4JLogger)HBaseServer.LOG).getLogger().setLevel(Level.ALL); + ((Log4JLogger)HBaseClient.LOG).getLogger().setLevel(Level.ALL); + ((Log4JLogger)ScannerCallable.LOG).getLogger().setLevel(Level.ALL); // Start up our mini cluster on top of an 0.92 root.dir that has data from // a 0.92 hbase run -- it has a table with 100 rows in it -- and see if // we can migrate from 0.92 @@ -122,6 +132,7 @@ public class TestMetaMigrationConvertingToPB { // rootdir should have had a table named 'TestTable' in it. Assert it // present. HTable t = new HTable(TEST_UTIL.getConfiguration(), TESTTABLE); + TEST_UTIL.waitTableEnabled(Bytes.toBytes(TESTTABLE)); ResultScanner scanner = t.getScanner(new Scan()); int count = 0; while (scanner.next() != null) {