hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabiano D. Beppler" <...@knewin.com>
Subject Unit test (junit) very slow
Date Fri, 18 Feb 2011 18:53:14 GMT

I am running a very simple JUnit test with HBase and the test takes a lot of
time to run when the computer is online (ie., connected to a wifi network).
When the computer is offline it runs a lot faster.

Online it takes more than 169 seconds to run
Offline it takes "only" 19 seconds to run

What is more interesting is that when the computer is online there isn't
other computers in the network, just a WIFI connection.
My computer is a MacBook Pro with Snow Leopard, HBase 0.20.6.

As you can see, the test is using the HBaseTestingUtility class. The
"problem" occurs when running line 7.

Is there anything I can do to avoid waiting so much time to run my JUnit

1    @Test
2   public void test1() throws Exception {
3        System.setProperty("test.build.data", "test_files/hbase/");
5        final HBaseTestingUtility hbaseUtility = new HBaseTestingUtility();
6        final HBaseConfiguration configuration =
7        hbaseUtility.startMiniCluster(); // "PROBLEM" HAPPENS WHEN STARTING
8        final HTable table =
9                new byte[][] { Bytes.toBytes("my_family_1"),
Bytes.toBytes("my_family_2") });
10       final HTable recTable = new HTable(configuration, "my_table");
11       Assert.assertEquals("my_table",
12       hbaseUtility.shutdownMiniCluster();
13    }

Thanks in advance.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message