SPR-5682: fixing test breakage on CI server due to strange non-determinism in the order of bean names being returned in the key set of the map of beans matching the required type.
@ -127,6 +129,7 @@ public class ConfigurationClassApplicationContextTests {
@@ -127,6 +129,7 @@ public class ConfigurationClassApplicationContextTests {
@ -134,11 +137,15 @@ public class ConfigurationClassApplicationContextTests {
@@ -134,11 +137,15 @@ public class ConfigurationClassApplicationContextTests {
try{
context.getBean(TestBean.class);
}catch(RuntimeExceptionex){
assertThat(ex.getMessage(),equalTo(
"No unique bean of type ["+TestBean.class.getName()+"] is defined: "+
"2 matching bean definitions found (tb1,tb2). Consider qualifying with "+
"getBean(Class<T> beanType, String beanName) or declaring one bean definition as "+
"@"+Primary.class.getSimpleName()));
assertThat(ex.getMessage(),
allOf(
containsString("No unique bean of type ["+TestBean.class.getName()+"] is defined"),