More GH Actions goodies (#3441)
* More GH Actions goodies * Add RabbitMQ, MongoDB & Redis services into GH actions * Remove Travis * * Add `distributionSha256Sum` into `gradle-wrapper.properties` * Try `TERM: dumb` to see difference for Gradle output in GH action * Add `-S` to see the reason of test failure * * Try MQTT plugin for RabbitMQ image * * Try `-i` for test failure in Gradle on Actions * * Use `eclipse-mosquitto` image for MQTT on actions * Fix `FtpServerOutboundTests` for the proper FTP file list * Output file list for the failed session in the `RotatingServersTests` * * Adjust SOUT in the test for Checkstyle * * Make some change to `RotatingServersTests`. Looks like the order for `@BeforeAll` methods is not determined and we may start to interaction with FTP server which is not started yet * Fix SSL Handshake Test - we already made this change for the NIO test, but the NET test is failing the same way - the cert failure switched to the server so the expected exception was not thrown on the client side. Due to JVM changes. * * Fix SFTP tests for wrong host and auto-startup state * Remove `-i` for Gradle in the GH Actions * * Try `--no-parallel` for Gradle in the GH Actions * * Try GH actions without Mosquitto * * Try `cyrilix/rabbitmq-mqtt` for GH Actions Co-authored-by: Gary Russell <grussell@pivotal.io>
This commit is contained in:
@@ -57,6 +57,7 @@ import org.springframework.integration.ip.util.TestingUtilities;
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.messaging.support.ErrorMessage;
|
||||
import org.springframework.messaging.support.GenericMessage;
|
||||
|
||||
/**
|
||||
@@ -415,10 +416,11 @@ public class SocketSupportTests {
|
||||
.isThrownBy(() -> testNetClientAndServerSSLDifferentContexts(true));
|
||||
}
|
||||
|
||||
private void testNetClientAndServerSSLDifferentContexts(boolean badClient) throws Exception {
|
||||
private void testNetClientAndServerSSLDifferentContexts(boolean badServer) throws Exception {
|
||||
System.setProperty("javax.net.debug", "all"); // SSL activity in the console
|
||||
TcpNetServerConnectionFactory server = new TcpNetServerConnectionFactory(0);
|
||||
TcpSSLContextSupport serverSslContextSupport = new DefaultTcpSSLContextSupport("server.ks",
|
||||
TcpSSLContextSupport serverSslContextSupport = new DefaultTcpSSLContextSupport(
|
||||
badServer ? "client.ks" : "server.ks",
|
||||
"server.truststore.ks", "secret", "secret");
|
||||
DefaultTcpNetSSLSocketFactorySupport serverTcpSocketFactorySupport =
|
||||
new DefaultTcpNetSSLSocketFactorySupport(serverSslContextSupport);
|
||||
@@ -426,8 +428,10 @@ public class SocketSupportTests {
|
||||
final List<Message<?>> messages = new ArrayList<Message<?>>();
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
server.registerListener(message -> {
|
||||
messages.add(message);
|
||||
latch.countDown();
|
||||
if (!(message instanceof ErrorMessage)) {
|
||||
messages.add(message);
|
||||
latch.countDown();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
server.setTcpSocketSupport(new DefaultTcpSocketSupport(false) {
|
||||
@@ -442,8 +446,7 @@ public class SocketSupportTests {
|
||||
TestingUtilities.waitListening(server, null);
|
||||
|
||||
TcpNetClientConnectionFactory client = new TcpNetClientConnectionFactory("localhost", server.getPort());
|
||||
TcpSSLContextSupport clientSslContextSupport = new DefaultTcpSSLContextSupport(
|
||||
badClient ? "server.ks" : "client.ks",
|
||||
TcpSSLContextSupport clientSslContextSupport = new DefaultTcpSSLContextSupport("client.ks",
|
||||
"client.truststore.ks", "secret", "secret");
|
||||
DefaultTcpNetSSLSocketFactorySupport clientTcpSocketFactorySupport =
|
||||
new DefaultTcpNetSSLSocketFactorySupport(clientSslContextSupport);
|
||||
|
||||
@@ -816,7 +816,7 @@ public class TcpNioConnectionTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("Timing is too short for CI/Travis")
|
||||
@Disabled("Timing is too short for CI")
|
||||
public void testNoDelayOnClose() throws Exception {
|
||||
TcpNioServerConnectionFactory cf = new TcpNioServerConnectionFactory(0);
|
||||
final CountDownLatch reading = new CountDownLatch(1);
|
||||
|
||||
Reference in New Issue
Block a user