[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-distro-pkg-dev
Subject:    /hg/icedtea-web: PR909: Unit test fix
From:       smohammad () icedtea ! classpath ! org (smohammad at icedtea ! classpath ! org)
Date:       2012-12-20 20:52:12
Message-ID: hg.4d294d8ea881.1356036732.8643924302249223276 () icedtea ! classpath ! org
[Download RAW message or body]

changeset 4d294d8ea881 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=4d294d8ea881
author: Saad Mohammad <smohammad at redhat.com>
date: Thu Dec 20 15:51:45 2012 -0500

	PR909: Unit test fix


diffstat:

 ChangeLog                                                           |   5 ++++
 tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java |  12 +++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diffs (60 lines):

diff -r 95fc28e972ad -r 4d294d8ea881 ChangeLog
--- a/ChangeLog	Thu Dec 20 15:46:26 2012 -0500
+++ b/ChangeLog	Thu Dec 20 15:51:45 2012 -0500
@@ -1,3 +1,8 @@
+2012-12-20  Saad Mohammad  <smohammad at redhat.com>
+
+	* tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java:
+	Added test and changes to work better with PR909 fix.
+
 2012-12-20  Saad Mohammad  <smohammad at redhat.com>
 
 	Fix PR909 - URL is invalid after normalization.
diff -r 95fc28e972ad -r 4d294d8ea881 \
                tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java
--- a/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java	Thu Dec 20 \
                15:46:26 2012 -0500
+++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java	Thu Dec 20 \
15:51:45 2012 -0500 @@ -38,6 +38,7 @@
 
 import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
+import java.net.URISyntaxException;
 import java.net.URL;
 import org.junit.Assert;
 import org.junit.Test;
@@ -61,22 +62,23 @@
         }
     }
 
-    private static URL normalizeUrl(URL uRL) throws MalformedURLException, \
UnsupportedEncodingException { +    private static URL normalizeUrl(URL uRL) throws \
MalformedURLException, UnsupportedEncodingException, URISyntaxException {  return \
ResourceTracker.normalizeUrl(uRL, false);  }
-    public static final int CHANGE_BORDER = 7;
+    public static final int CHANGE_BORDER = 6;
 
     public static URL[] getUrls() throws MalformedURLException {
         URL[] u = {
             /*constant*/
             null,
-            new URL("http://localhost:44321/Spaces%20Can%20Be%20Everyw%2Fhere1.jnlp"),
                
             new URL("file:///home/jvanek/Desktop/icedtea-web/tests.build/jnlp_test_server/Spaces%20can%20be%20everywhere2.jnlp"),
                
-            new URL("http://localhost/Spaces+Can+Be+Everywhere1.jnlp"),
             new URL("http://localhost:44321/SpacesCanBeEverywhere1.jnlp"),
             new URL("http:///SpacesCanBeEverywhere1.jnlp"),
             new URL("file://localhost/home/jvanek/Desktop/icedtea-web/tests.build/jnlp_test_server/Spaces \
can be everywhere2.jnlp"), +            new \
URL("http://localhost:44321/testpage.jnlp?applicationID=25"),  /*changing*/
+            new URL("http://localhost:44321/Spaces%20Can%20Be%20Everyw%2Fhere1.jnlp"),
 +            new URL("http://localhost/Spaces+Can+Be+Everywhere1.jnlp"),
             new URL("http://localhost/SpacesC anBeEverywhere1.jnlp?a=5&b=10#df"),
             new URL("http:///oook.jnlp?a=5&b=ahoj ???? dd#df"),
             new URL("http://localhost/Spaces?????????????????????? can \
!@^*(){}[].jnlp?a=5&ahoj ???? dd#df"), @@ -85,7 +87,7 @@
         return u;
     }
 
-    public static URL[] getNormalizedUrls() throws MalformedURLException, \
UnsupportedEncodingException { +    public static URL[] getNormalizedUrls() throws \
MalformedURLException, UnsupportedEncodingException, URISyntaxException {  URL[] u = \
getUrls();  
         URL[] n = new URL[u.length];


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic