X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Futils%2FUrlDownloadClientTest.java;h=be8cee4e8a9d8194d94228167ad52f8d93c7eeac;hb=f5f6af7c725d698fd1f53aca15b9a5e5743ae434;hp=2bd8dd0ae5a45489682c1fde6b9384e48145378c;hpb=136c0793b90b72b928c4d77dc109dd5c644e00d3;p=jalview.git diff --git a/test/jalview/ws/utils/UrlDownloadClientTest.java b/test/jalview/ws/utils/UrlDownloadClientTest.java index 2bd8dd0..be8cee4 100644 --- a/test/jalview/ws/utils/UrlDownloadClientTest.java +++ b/test/jalview/ws/utils/UrlDownloadClientTest.java @@ -26,7 +26,8 @@ import java.io.IOException; import org.testng.Assert; import org.testng.annotations.Test; -public class UrlDownloadClientTest { +public class UrlDownloadClientTest +{ /** * Test that url is successfully loaded into download file @@ -35,7 +36,8 @@ public class UrlDownloadClientTest { public void UrlDownloadTest() { UrlDownloadClient client = new UrlDownloadClient(); - String urlstring = "http://identifiers.org/rest/collections/"; + String urlstring = "http://www.jalview.org/services/identifiers"; + // was "http://identifiers.org/rest/collections/"; String outfile = "testfile.tmp"; try @@ -58,12 +60,14 @@ public class UrlDownloadClientTest { // download file has a believable size // identifiers.org file typically at least 250K - Assert.assertTrue(f.length() > 250000); - + long n = f.length(); if (f.exists()) { f.delete(); } + // 74589 + Assert.assertTrue(n > 70000); + } @@ -71,9 +75,11 @@ public class UrlDownloadClientTest { * Test that garbage in results in IOException */ @Test( - groups = { "Network" }, + groups = + { "Network" }, enabled = true, - expectedExceptions = { IOException.class }) + expectedExceptions = + { IOException.class }) public void DownloadGarbageUrlTest() throws IOException { UrlDownloadClient client = new UrlDownloadClient();