This closes #1025
This commit is contained in:
commit
b36569d821
|
@ -178,6 +178,7 @@ public class PostOfficeJournalLoader implements JournalLoader {
|
||||||
addressBindingInfosMap.put(addressBindingInfo.getId(), addressBindingInfo);
|
addressBindingInfosMap.put(addressBindingInfo.getId(), addressBindingInfo);
|
||||||
|
|
||||||
AddressInfo addressInfo = new AddressInfo(addressBindingInfo.getName()).setRoutingTypes(addressBindingInfo.getRoutingTypes());
|
AddressInfo addressInfo = new AddressInfo(addressBindingInfo.getName()).setRoutingTypes(addressBindingInfo.getRoutingTypes());
|
||||||
|
addressInfo.setId(addressBindingInfo.getId());
|
||||||
postOffice.addAddressInfo(addressInfo);
|
postOffice.addAddressInfo(addressInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -411,6 +411,29 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
|
||||||
Assert.assertFalse(ActiveMQServerControlTest.contains(address.toString(), serverControl.getAddressNames()));
|
Assert.assertFalse(ActiveMQServerControlTest.contains(address.toString(), serverControl.getAddressNames()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetAddressDeletedFromJournal() throws Exception {
|
||||||
|
SimpleString address = RandomUtil.randomSimpleString();
|
||||||
|
SimpleString name = RandomUtil.randomSimpleString();
|
||||||
|
|
||||||
|
ActiveMQServerControl serverControl = createManagementControl();
|
||||||
|
|
||||||
|
// due to replication, there can be another queue created for replicating
|
||||||
|
// management operations
|
||||||
|
|
||||||
|
Assert.assertFalse(ActiveMQServerControlTest.contains(address.toString(), serverControl.getAddressNames()));
|
||||||
|
serverControl.createAddress(address.toString(), "ANYCAST");
|
||||||
|
Assert.assertTrue(ActiveMQServerControlTest.contains(address.toString(), serverControl.getAddressNames()));
|
||||||
|
|
||||||
|
restartServer();
|
||||||
|
|
||||||
|
serverControl.deleteAddress(address.toString());
|
||||||
|
|
||||||
|
restartServer();
|
||||||
|
|
||||||
|
Assert.assertFalse(ActiveMQServerControlTest.contains(address.toString(), serverControl.getAddressNames()));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMessageCounterMaxDayCount() throws Exception {
|
public void testMessageCounterMaxDayCount() throws Exception {
|
||||||
ActiveMQServerControl serverControl = createManagementControl();
|
ActiveMQServerControl serverControl = createManagementControl();
|
||||||
|
|
Loading…
Reference in New Issue