This commit is contained in:
Clebert Suconic 2017-02-20 10:25:11 -05:00
commit b36569d821
2 changed files with 24 additions and 0 deletions

View File

@ -178,6 +178,7 @@ public class PostOfficeJournalLoader implements JournalLoader {
addressBindingInfosMap.put(addressBindingInfo.getId(), addressBindingInfo);
AddressInfo addressInfo = new AddressInfo(addressBindingInfo.getName()).setRoutingTypes(addressBindingInfo.getRoutingTypes());
addressInfo.setId(addressBindingInfo.getId());
postOffice.addAddressInfo(addressInfo);
}
}

View File

@ -411,6 +411,29 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
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
public void testMessageCounterMaxDayCount() throws Exception {
ActiveMQServerControl serverControl = createManagementControl();