Browse Source

Simplify CLI integration auto-config test by removing use of Artemis

Artemis seems to be a bit flakey which is causing sporadic build
failures, for example due to an NPE in Artemis' code.
pull/7322/head
Andy Wilkinson 9 years ago
parent
commit
becf225911
  1. 2
      spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java
  2. 17
      spring-boot-cli/test-samples/app.groovy
  3. 10
      spring-boot-cli/test-samples/integration_auto_test.groovy

2
spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java

@ -96,7 +96,7 @@ public class TestCommandIntegrationTests { @@ -96,7 +96,7 @@ public class TestCommandIntegrationTests {
@Test
public void integrationAutoConfigTest() throws Exception {
String output = this.cli.test("integration_auto_test.groovy", "jms.groovy");
String output = this.cli.test("integration_auto_test.groovy", "app.groovy");
assertThat(output).contains("OK (1 test)");
}

17
spring-boot-cli/test-samples/app.groovy

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
@Configuration
class App {
@Bean
MyService myService() {
return new MyService()
}
}
class MyService {
String sayWorld() {
return "World!"
}
}

10
spring-boot-cli/test-samples/integration_auto_test.groovy

@ -1,14 +1,12 @@ @@ -1,14 +1,12 @@
import org.springframework.jms.core.JmsTemplate
@SpringBootTest(classes=JmsExample)
class JmsTests {
@SpringBootTest(classes=App)
class AppTests {
@Autowired
JmsTemplate jmsTemplate
MyService myService
@Test
void test() {
assertNotNull(jmsTemplate)
assertNotNull(myService)
}
}

Loading…
Cancel
Save