HBASE-2196 Addendum fix TestReplicationAdmin where multi-slave is supported

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1171036 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2011-09-15 10:34:36 +00:00
parent 692207c368
commit f23110b987
2 changed files with 5 additions and 5 deletions

View File

@ -427,7 +427,7 @@ public class ReplicationSourceManager {
* @param path full path of the node whose children have changed * @param path full path of the node whose children have changed
*/ */
public void nodeChildrenChanged(String path) { public void nodeChildrenChanged(String path) {
if (stopper.isStopped()) { if (stopper == null || stopper.isStopped()) {
return; return;
} }
refreshRegionServersList(path); refreshRegionServersList(path);

View File

@ -77,16 +77,16 @@ public class TestReplicationAdmin {
// OK! // OK!
} }
assertEquals(1, admin.getPeersCount()); assertEquals(1, admin.getPeersCount());
// Add a second, returns illegal since multi-slave isn't supported // Add a second since multi-slave is supported
try { try {
admin.addPeer(ID_SECOND, KEY_SECOND); admin.addPeer(ID_SECOND, KEY_SECOND);
fail();
} catch (IllegalStateException iae) { } catch (IllegalStateException iae) {
fail();
// OK! // OK!
} }
assertEquals(1, admin.getPeersCount()); assertEquals(2, admin.getPeersCount());
// Remove the first peer we added // Remove the first peer we added
admin.removePeer(ID_ONE); admin.removePeer(ID_ONE);
assertEquals(0, admin.getPeersCount()); assertEquals(1, admin.getPeersCount());
} }
} }