Skip to content

Commit

Permalink
Try to bind on a different port for travis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
beikov committed Jan 31, 2017
1 parent c8fa605 commit 3883240
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void before() throws Exception {
FtpServerFactory serverFactory = new FtpServerFactory();
ListenerFactory listenerFactory = new ListenerFactory();
listenerFactory.setServerAddress("127.0.0.1");
listenerFactory.setPort(21);
listenerFactory.setPort(21000);
serverFactory.addListener("default", listenerFactory.createListener());
serverFactory.setUserManager(new AdminUserManagerFactory(directory.getAbsolutePath()));

Expand Down Expand Up @@ -92,7 +92,7 @@ public void testCreateStorageProvider_whenSuccessful() throws Exception {

// When
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost/test-1");
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost:21000/test-1");
properties.put(FtpStorage.CREATE_DIRECTORY_PROPERTY, "false");
StorageProvider provider = factory.createStorageProvider(properties);

Expand All @@ -104,7 +104,7 @@ public void testCreateStorageProvider_whenSuccessful() throws Exception {
public void testCreateStorageProvider_whenDirectoryDoesNotExist() throws Exception {
// When & Then
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost/test-1");
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost:21000/test-1");
properties.put(FtpStorage.CREATE_DIRECTORY_PROPERTY, "false");
Assert.verifyException(factory, StorageException.class).createStorageProvider(properties);
}
Expand All @@ -113,7 +113,7 @@ public void testCreateStorageProvider_whenDirectoryDoesNotExist() throws Excepti
public void testCreateStorageProvider_whenSuccessfulCreatingDirectory() throws Exception {
// When
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost/test-1");
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost:21000/test-1");
properties.put(FtpStorage.CREATE_DIRECTORY_PROPERTY, "true");
StorageProvider provider = factory.createStorageProvider(properties);

Expand All @@ -129,7 +129,7 @@ public void testCreateStorageProvider_whenResolvesToFile() throws Exception {

// When & Then
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost/test-1");
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost:21000/test-1");
properties.put(FtpStorage.CREATE_DIRECTORY_PROPERTY, "false");
Assert.verifyException(factory, StorageException.class).createStorageProvider(properties);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void before() throws Exception {
FtpServerFactory serverFactory = new FtpServerFactory();
ListenerFactory listenerFactory = new ListenerFactory();
listenerFactory.setServerAddress("127.0.0.1");
listenerFactory.setPort(21);
listenerFactory.setPort(21000);
serverFactory.addListener("default", listenerFactory.createListener());
serverFactory.setUserManager(new AdminUserManagerFactory(directory.getParentFile().getAbsolutePath()));

Expand All @@ -53,7 +53,7 @@ public void before() throws Exception {

FtpStorageProviderFactory factory = new FtpStorageProviderFactory();
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost/" + directory.getName());
properties.put(FtpStorage.URL_PROPERTY, "ftp://admin:admin@localhost:21000/" + directory.getName());
properties.put(FtpStorage.CREATE_DIRECTORY_PROPERTY, "false");
storageProvider = factory.createStorageProvider(properties);
}
Expand Down

0 comments on commit 3883240

Please sign in to comment.