Expose JMS message listener container ids
Issue: SPR-13633
This commit is contained in:
@@ -169,6 +169,8 @@ public abstract class AbstractJmsAnnotationDrivenTests {
|
||||
|
||||
JmsListenerEndpointRegistry customRegistry =
|
||||
context.getBean("customRegistry", JmsListenerEndpointRegistry.class);
|
||||
assertEquals("Wrong number of containers in the registry", 2,
|
||||
customRegistry.getListenerContainerIds().size());
|
||||
assertEquals("Wrong number of containers in the registry", 2,
|
||||
customRegistry.getListenerContainers().size());
|
||||
assertNotNull("Container with custom id on the annotation should be found",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -76,6 +76,7 @@ public class JmsListenerEndpointRegistrarTests {
|
||||
registrar.afterPropertiesSet();
|
||||
assertNotNull("Container not created", registry.getListenerContainer("some id"));
|
||||
assertEquals(1, registry.getListenerContainers().size());
|
||||
assertEquals("some id", registry.getListenerContainerIds().iterator().next());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -98,6 +99,7 @@ public class JmsListenerEndpointRegistrarTests {
|
||||
registrar.afterPropertiesSet();
|
||||
assertNotNull("Container not created", registry.getListenerContainer("myEndpoint"));
|
||||
assertEquals(1, registry.getListenerContainers().size());
|
||||
assertEquals("myEndpoint", registry.getListenerContainerIds().iterator().next());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user