From a774f1df69b1d7fd6c3fda2acf7e0adf883def25 Mon Sep 17 00:00:00 2001 From: joewitt Date: Wed, 6 Dec 2017 12:03:16 -0500 Subject: [PATCH] NIFI-4673 changed offending tests to be integration tests and fixed travis config to run the build only once and during appropriate script phase instead of install. Reviewed by Bende. --- .travis.yml | 7 +++++-- ...stListenAndPutSyslog.java => ITListenAndPutSyslog.java} | 4 ++-- ...mmunication.java => ITJettyWebSocketCommunication.java} | 2 +- ...ation.java => ITJettyWebSocketSecureCommunication.java} | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) rename nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/{TestListenAndPutSyslog.java => ITListenAndPutSyslog.java} (98%) rename nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/{TestJettyWebSocketCommunication.java => ITJettyWebSocketCommunication.java} (99%) rename nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/{TestJettyWebSocketSecureCommunication.java => ITJettyWebSocketSecureCommunication.java} (95%) diff --git a/.travis.yml b/.travis.yml index e5b0ccbe0e..6bb35a142d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ cache: directories: - $HOME/.m2 - $HOME/.npm + before_cache: # Remove nifi repo again to save travis from caching it - rm -rf $HOME/.m2/repository/org/apache/nifi/ @@ -47,9 +48,11 @@ before_install: # Remove nifi repo again to save travis from caching it - rm -rf $HOME/.m2/repository/org/apache/nifi/ -install: +install: true + +script: # Replace variables seems to be the only option to pass proper values to surefire # Note: The reason the sed is done as part of script is to ensure the pom hack # won't affect the 'clean install' above - bash .travis.sh - - mvn -T 2C -Pcontrib-check -Ddir-only clean install + - mvn -T 2 clean install -Pcontrib-check -Ddir-only diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenAndPutSyslog.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/ITListenAndPutSyslog.java similarity index 98% rename from nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenAndPutSyslog.java rename to nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/ITListenAndPutSyslog.java index 29fa69003c..5d0562d262 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenAndPutSyslog.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/ITListenAndPutSyslog.java @@ -38,9 +38,9 @@ import java.nio.charset.Charset; * Tests PutSyslog sending messages to ListenSyslog to simulate a syslog server forwarding * to ListenSyslog, or PutSyslog sending to a syslog server. */ -public class TestListenAndPutSyslog { +public class ITListenAndPutSyslog { - static final Logger LOGGER = LoggerFactory.getLogger(TestListenAndPutSyslog.class); + static final Logger LOGGER = LoggerFactory.getLogger(ITListenAndPutSyslog.class); private ListenSyslog listenSyslog; private TestRunner listenSyslogRunner; diff --git a/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/TestJettyWebSocketCommunication.java b/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/ITJettyWebSocketCommunication.java similarity index 99% rename from nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/TestJettyWebSocketCommunication.java rename to nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/ITJettyWebSocketCommunication.java index a225447b95..6d3f0630fc 100644 --- a/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/TestJettyWebSocketCommunication.java +++ b/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/ITJettyWebSocketCommunication.java @@ -46,7 +46,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; -public class TestJettyWebSocketCommunication { +public class ITJettyWebSocketCommunication { protected int serverPort; protected String serverPath = "/test"; diff --git a/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/TestJettyWebSocketSecureCommunication.java b/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/ITJettyWebSocketSecureCommunication.java similarity index 95% rename from nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/TestJettyWebSocketSecureCommunication.java rename to nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/ITJettyWebSocketSecureCommunication.java index f5c96c21fa..249af7a2bd 100644 --- a/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/TestJettyWebSocketSecureCommunication.java +++ b/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/src/test/java/org/apache/nifi/websocket/jetty/ITJettyWebSocketSecureCommunication.java @@ -22,12 +22,12 @@ import org.apache.nifi.websocket.WebSocketService; import org.junit.Test; -public class TestJettyWebSocketSecureCommunication extends TestJettyWebSocketCommunication{ +public class ITJettyWebSocketSecureCommunication extends ITJettyWebSocketCommunication{ private final StandardSSLContextService sslContextService = new StandardSSLContextService(); private final ControllerServiceTestContext sslTestContext = new ControllerServiceTestContext(sslContextService, "SSLContextService"); - public TestJettyWebSocketSecureCommunication() { + public ITJettyWebSocketSecureCommunication() { try { sslTestContext.setCustomValue(StandardSSLContextService.KEYSTORE, "src/test/resources/certs/localhost-ks.jks"); sslTestContext.setCustomValue(StandardSSLContextService.KEYSTORE_PASSWORD, "localtest");