tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [09/16] tomee git commit: fixing test
Date Tue, 05 May 2015 05:50:29 GMT
fixing test


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/a629b804
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/a629b804
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/a629b804

Branch: refs/heads/fb_tomee2_owb16
Commit: a629b804aa0493f9fab8729d1d2d65144dcc9132
Parents: 0421a02
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Thu Apr 30 10:27:58 2015 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Mon May 4 19:00:19 2015 +0200

----------------------------------------------------------------------
 .../openejb/util/classloader/URLClassLoaderFirstTest.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/a629b804/container/openejb-core/src/test/java/org/apache/openejb/util/classloader/URLClassLoaderFirstTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/util/classloader/URLClassLoaderFirstTest.java
b/container/openejb-core/src/test/java/org/apache/openejb/util/classloader/URLClassLoaderFirstTest.java
index f77d7e2..e7646dd 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/util/classloader/URLClassLoaderFirstTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/util/classloader/URLClassLoaderFirstTest.java
@@ -21,17 +21,17 @@ import org.apache.openejb.loader.JarLocation;
 import org.apache.openejb.loader.SystemInstance;
 import org.junit.Test;
 
-import javax.wsdl.WSDLException;
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.util.Properties;
+import javax.wsdl.WSDLException;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 public class URLClassLoaderFirstTest {
     @Test
-    public void loadFromAppIfNotInContainer() throws MalformedURLException {
+    public void loadFromAppIfNotInContainer() throws Exception {
         assertTrue(URLClassLoaderFirst.shouldSkip("javax.wsdl.WSDLException"));
 
         final URLClassLoader parent = new URLClassLoader(new URL[0]) {
@@ -45,6 +45,7 @@ public class URLClassLoaderFirstTest {
         };
         final URLClassLoader tmpLoader = new URLClassLoaderFirst(new URL[]{JarLocation.jarLocation(WSDLException.class).toURI().toURL()},
parent);
 
+        SystemInstance.init(new Properties());
         SystemInstance.get().setComponent(ParentClassLoaderFinder.class, new ParentClassLoaderFinder()
{
             @Override
             public ClassLoader getParentClassLoader(final ClassLoader fallback) {
@@ -62,5 +63,6 @@ public class URLClassLoaderFirstTest {
         }
 
         assertTrue(URLClassLoaderFirst.shouldSkip("javax.wsdl.WSDLException"));
+        SystemInstance.reset();
     }
 }


Mime
View raw message