Skip to content
Permalink
Browse files
Debugging for GitHub builds
  • Loading branch information
sebbASF committed Jul 27, 2021
1 parent 58d980b commit 6595490306f7b40b1335de23ae859cbfab81bca5
Showing 2 changed files with 20 additions and 4 deletions.
@@ -25,11 +25,12 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
java: [ 8, 11, 16 ]
java: [ 11 ]
# java: [ 8, 11, 16 ]
experimental: [false]
include:
- java: 17-ea
experimental: true
# include:
# - java: 17-ea
# experimental: true

steps:
- uses: actions/checkout@v2.3.4
@@ -104,8 +104,10 @@ public static void setUpClass() throws Exception {
*/
private synchronized static void setUpClass(final boolean implicit) throws FtpException {
if (EmbeddedFtpServer != null) {
System.err.println("Server already active");
return;
}
System.err.println("Server startup");
// Use an ephemeral port.
SocketPort = 0;
final FtpServerFactory serverFactory = new FtpServerFactory();
@@ -144,11 +146,13 @@ private synchronized static void setUpClass(final boolean implicit) throws FtpEx
serverFactory.addListener("default", factory.createListener());

// start the server
System.err.println("Server starting");
EmbeddedFtpServer = serverFactory.createServer();
EmbeddedFtpServer.start();
SocketPort = ((org.apache.ftpserver.impl.DefaultFtpServer) EmbeddedFtpServer).getListener("default").getPort();
ConnectionUri = "ftps://test:test@localhost:" + SocketPort;
// System.out.printf("jdk.tls.disabledAlgorithms = %s%n", System.getProperty("jdk.tls.disabledAlgorithms"));
System.err.println("Server started");
}

@Parameters(name = "endpointCheckingEnabled={0}")
@@ -168,6 +172,7 @@ private void assertClientCode(final FTPSClient client) {
}

private FTPSClient loginClient() throws SocketException, IOException {
System.err.println(">>loginClient");
final FTPSClient client = new FTPSClient(IMPLICIT);
//
client.setControlKeepAliveReplyTimeout(null);
@@ -202,6 +207,7 @@ private FTPSClient loginClient() throws SocketException, IOException {
//
client.execPROT("P");
assertClientCode(client);
System.err.println("<<loginClient");
return client;
}

@@ -219,6 +225,7 @@ private void retrieveFile(final String pathname) throws SocketException, IOExcep

@Test
public void testHasFeature() throws SocketException, IOException {
System.err.println(">>testHasFeature");
loginClient().disconnect();
}

@@ -235,26 +242,31 @@ private void testListFiles(final String pathname) throws SocketException, IOExce

@Test
public void testListFilesPathNameEmpty() throws SocketException, IOException {
System.err.println(">>testListFilesPathNameEmpty");
testListFiles("");
}

@Test
public void testListFilesPathNameJunk() throws SocketException, IOException {
System.err.println(">>testListFilesPathNameJunk");
testListFiles(" Junk ");
}

@Test
public void testListFilesPathNameNull() throws SocketException, IOException {
System.err.println(">>testListFilesPathNameNull");
testListFiles(null);
}

@Test
public void testListFilesPathNameRoot() throws SocketException, IOException {
System.err.println(">>testListFilesPathNameRoot");
testListFiles("/");
}

@Test
public void testMdtmCalendar() throws SocketException, IOException {
System.err.println(">>testMdtmCalendar");
testMdtmCalendar("/file.txt");
}

@@ -292,6 +304,7 @@ private void testMdtmFile(final String pathname) throws SocketException, IOExcep

@Test
public void testMdtmInstant() throws SocketException, IOException {
System.err.println(">>testMdtmInstant");
testMdtmInstant("/file.txt");
}

@@ -311,6 +324,7 @@ private void testMdtmInstant(final String pathname) throws SocketException, IOEx

@Test
public void testOpenClose() throws SocketException, IOException {
System.err.println(">>testOpenClose");
final FTPSClient ftpsClient = loginClient();
try {
assertTrue(ftpsClient.hasFeature("MODE"));
@@ -322,6 +336,7 @@ public void testOpenClose() throws SocketException, IOException {

@Test
public void testRetrieveFilePathNameRoot() throws SocketException, IOException {
System.err.println(">>testRetrieveFilePathNameRoot");
retrieveFile("/file.txt");
}
}

0 comments on commit 6595490

Please sign in to comment.