Add shutdown of clusters -- not shutting down was causing subsequent TestMergeTool to fail because there was running zk
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1021789 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fc32ccdb2b
commit
d405dbeca6
|
@ -34,7 +34,6 @@ import static org.junit.Assert.assertEquals;
|
|||
* only for "unit'ish tests".
|
||||
*/
|
||||
public class TestMultiClusters {
|
||||
|
||||
private static final byte[] TABLE_NAME = Bytes.toBytes("test");
|
||||
private static final byte[] FAM_NAME = Bytes.toBytes("fam");
|
||||
private static final byte[] ROW = Bytes.toBytes("row");
|
||||
|
@ -61,23 +60,28 @@ public class TestMultiClusters {
|
|||
// They share the same ensemble, but homed differently
|
||||
utility2.setZkCluster(utility1.getZkCluster());
|
||||
|
||||
utility1.startMiniCluster();
|
||||
utility2.startMiniCluster();
|
||||
try {
|
||||
utility1.startMiniCluster();
|
||||
utility2.startMiniCluster();
|
||||
|
||||
HTable table1 = utility1.createTable(TABLE_NAME, FAM_NAME);
|
||||
HTable table2 = utility2.createTable(TABLE_NAME, FAM_NAME);
|
||||
HTable table1 = utility1.createTable(TABLE_NAME, FAM_NAME);
|
||||
HTable table2 = utility2.createTable(TABLE_NAME, FAM_NAME);
|
||||
|
||||
Put put = new Put(ROW);
|
||||
put.add(FAM_NAME, QUAL_NAME, VALUE);
|
||||
table1.put(put);
|
||||
Put put = new Put(ROW);
|
||||
put.add(FAM_NAME, QUAL_NAME, VALUE);
|
||||
table1.put(put);
|
||||
|
||||
Get get = new Get(ROW);
|
||||
get.addColumn(FAM_NAME, QUAL_NAME);
|
||||
Result res = table1.get(get);
|
||||
assertEquals(1, res.size());
|
||||
Get get = new Get(ROW);
|
||||
get.addColumn(FAM_NAME, QUAL_NAME);
|
||||
Result res = table1.get(get);
|
||||
assertEquals(1, res.size());
|
||||
|
||||
res = table2.get(get);
|
||||
assertEquals(0, res.size());
|
||||
res = table2.get(get);
|
||||
assertEquals(0, res.size());
|
||||
} finally {
|
||||
utility1.shutdownMiniCluster();
|
||||
utility2.shutdownMiniCluster();
|
||||
utility1.shutdownMiniZKCluster();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue