From 2b16a4af39b0f7ab1e38628d6123bef91561ac32 Mon Sep 17 00:00:00 2001 From: Christian Dupuis Date: Fri, 13 Dec 2013 23:31:55 +0100 Subject: [PATCH] Fix failing test due to change in JMX export default setting --- .../boot/autoconfigure/jmx/JmxAutoConfigurationTests.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java index 77e52ac8d8..6df71f80ee 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java @@ -47,14 +47,13 @@ public class JmxAutoConfigurationTests { } } - @Test(expected = NoSuchBeanDefinitionException.class) + @Test public void testDefaultMBeanExport() { this.context = new AnnotationConfigApplicationContext(); this.context.register(JmxAutoConfiguration.class); this.context.refresh(); - this.context.getBean(MBeanExporter.class); - fail(); + assertNotNull(this.context.getBean(MBeanExporter.class)); } @Test(expected = NoSuchBeanDefinitionException.class)