Fix compatibility with the latest Spring Boot
https://build.spring.io/browse/INTSAMPLES-NIGHTLY-2099/
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.integration.samples.barrier;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
|
||||
import org.springframework.boot.Banner.Mode;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
@@ -42,11 +44,15 @@ public class Application {
|
||||
connectionFactory.resetConnection();
|
||||
// https://github.com/spring-projects/spring-boot/issues/3945
|
||||
|
||||
ConfigurableApplicationContext client
|
||||
= new SpringApplicationBuilder("/META-INF/spring/integration/client-context.xml")
|
||||
SpringApplication application = new SpringApplicationBuilder()
|
||||
.web(WebApplicationType.NONE)
|
||||
.bannerMode(Mode.OFF)
|
||||
.run(args);
|
||||
.application();
|
||||
|
||||
application.setSources(Collections.singleton("/META-INF/spring/integration/client-context.xml"));
|
||||
|
||||
ConfigurableApplicationContext client = application.run(args);
|
||||
|
||||
RequestGateway requestGateway = client.getBean("requestGateway", RequestGateway.class);
|
||||
String request = "A,B,C";
|
||||
System.out.println("\n\n++++++++++++ Sending: " + request + " ++++++++++++\n");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -96,7 +96,7 @@ public class TcpClientServerDemoTest {
|
||||
}
|
||||
});
|
||||
}
|
||||
assertTrue(latch.await(20, TimeUnit.SECONDS));
|
||||
assertTrue(latch.await(60, TimeUnit.SECONDS));
|
||||
assertEquals(0, results.size());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user