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.

This commit is contained in:
joewitt 2017-12-06 12:03:16 -05:00
parent 7e61c6333c
commit a774f1df69
4 changed files with 10 additions and 7 deletions

View File

@ -31,6 +31,7 @@ cache:
directories: directories:
- $HOME/.m2 - $HOME/.m2
- $HOME/.npm - $HOME/.npm
before_cache: before_cache:
# Remove nifi repo again to save travis from caching it # Remove nifi repo again to save travis from caching it
- rm -rf $HOME/.m2/repository/org/apache/nifi/ - rm -rf $HOME/.m2/repository/org/apache/nifi/
@ -47,9 +48,11 @@ before_install:
# Remove nifi repo again to save travis from caching it # Remove nifi repo again to save travis from caching it
- rm -rf $HOME/.m2/repository/org/apache/nifi/ - 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 # 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 # Note: The reason the sed is done as part of script is to ensure the pom hack
# won't affect the 'clean install' above # won't affect the 'clean install' above
- bash .travis.sh - bash .travis.sh
- mvn -T 2C -Pcontrib-check -Ddir-only clean install - mvn -T 2 clean install -Pcontrib-check -Ddir-only

View File

@ -38,9 +38,9 @@ import java.nio.charset.Charset;
* Tests PutSyslog sending messages to ListenSyslog to simulate a syslog server forwarding * Tests PutSyslog sending messages to ListenSyslog to simulate a syslog server forwarding
* to ListenSyslog, or PutSyslog sending to a syslog server. * 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 ListenSyslog listenSyslog;
private TestRunner listenSyslogRunner; private TestRunner listenSyslogRunner;

View File

@ -46,7 +46,7 @@ import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
public class TestJettyWebSocketCommunication { public class ITJettyWebSocketCommunication {
protected int serverPort; protected int serverPort;
protected String serverPath = "/test"; protected String serverPath = "/test";

View File

@ -22,12 +22,12 @@ import org.apache.nifi.websocket.WebSocketService;
import org.junit.Test; import org.junit.Test;
public class TestJettyWebSocketSecureCommunication extends TestJettyWebSocketCommunication{ public class ITJettyWebSocketSecureCommunication extends ITJettyWebSocketCommunication{
private final StandardSSLContextService sslContextService = new StandardSSLContextService(); private final StandardSSLContextService sslContextService = new StandardSSLContextService();
private final ControllerServiceTestContext sslTestContext = new ControllerServiceTestContext(sslContextService, "SSLContextService"); private final ControllerServiceTestContext sslTestContext = new ControllerServiceTestContext(sslContextService, "SSLContextService");
public TestJettyWebSocketSecureCommunication() { public ITJettyWebSocketSecureCommunication() {
try { try {
sslTestContext.setCustomValue(StandardSSLContextService.KEYSTORE, "src/test/resources/certs/localhost-ks.jks"); sslTestContext.setCustomValue(StandardSSLContextService.KEYSTORE, "src/test/resources/certs/localhost-ks.jks");
sslTestContext.setCustomValue(StandardSSLContextService.KEYSTORE_PASSWORD, "localtest"); sslTestContext.setCustomValue(StandardSSLContextService.KEYSTORE_PASSWORD, "localtest");