Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-02-28 06:38:50 +0000
committerslewis2009-02-28 06:38:50 +0000
commitcd5f7762e766d20b4a280c8d21b77b02665b9a62 (patch)
tree637d07cdbac793852e76a21ebdb2481b0885fff8
parentccebe3500d167483281138d17137cb2e062b3307 (diff)
downloadorg.eclipse.ecf-cd5f7762e766d20b4a280c8d21b77b02665b9a62.tar.gz
org.eclipse.ecf-cd5f7762e766d20b4a280c8d21b77b02665b9a62.tar.xz
org.eclipse.ecf-cd5f7762e766d20b4a280c8d21b77b02665b9a62.zip
Fixes for bug 266140 with additional tests
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLRetrieveTest.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLRetrieveTest.java b/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLRetrieveTest.java
index 7a85379cf..8ae3ddd99 100755
--- a/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLRetrieveTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLRetrieveTest.java
@@ -30,7 +30,8 @@ public class URLRetrieveTest extends AbstractRetrieveTestCase {
public static final String HTTP_RETRIEVE = "http://www.eclipse.org/ecf/ip_log.html";
public static final String HTTPS_RETRIEVE = "https://www.verisign.com";
public static final String HTTP_404_FAIL_RETRIEVE = "http://www.google.com/googleliciousafdasdfasdfasdf";
-
+ public static final String HTTP_BAD_URL = "http:fubar";
+
private static final String FTP_RETRIEVE = "ftp://ftp.osuosl.org/pub/eclipse/rt/ecf/org.eclipse.ecf.examples-1.0.3.v20070927-1821.zip";
// See bug 237936
@@ -139,6 +140,18 @@ public class URLRetrieveTest extends AbstractRetrieveTestCase {
}
}
+ public void testRetrieveBadURL() throws Exception {
+ try {
+ testReceiveFails(HTTP_BAD_URL);
+ IIncomingFileTransferReceiveDoneEvent event = (IIncomingFileTransferReceiveDoneEvent) doneEvents.get(0);
+ Exception except = event.getException();
+ assertTrue(except != null);
+ } catch (final Exception e) {
+ e.printStackTrace();
+ fail(e.toString());
+ }
+ }
+
public void testReceiveGzip() throws Exception {
testReceive(BUG_237936_URL);
}

Back to the top