List of usage examples for org.apache.commons.net.ftp FTPConnectionClosedException getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:at.beris.virtualfile.client.FtpClientIntegrationTest.java
@Test public void reconnectAfterIdleTimeout() throws IOException, InterruptedException { try {/*from www. ja va 2s . c om*/ ftpClient.createFile(TEST_FILE); Thread.currentThread().sleep(3000); Assert.assertTrue(ftpClient.list("/").size() > 0); } catch (FTPConnectionClosedException e) { fail(e.getClass().getSimpleName() + " not handled."); } }
From source file:at.beris.virtualfile.client.FtpClientIntegrationTest.java
@Test public void reconnectAfterServerClosedConnection() throws IOException { try {// ww w.j av a2 s.c om ftpClient.createFile(TEST_FILE); for (FtpIoSession session : ftpServerListener.getActiveSessions()) { session.close(); } Assert.assertTrue(ftpClient.list("/").size() > 0); } catch (FTPConnectionClosedException e) { fail(e.getClass().getSimpleName() + " not handled."); } }