From b559f195270c0a1007b2c7a081573beec901c89d Mon Sep 17 00:00:00 2001 From: Jesse McConnell Date: Tue, 11 Aug 2009 16:42:14 +0000 Subject: [PATCH] fix up the test-policy git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@691 7e9141cc-0065-0410-87d8-b60c137991c4 --- jetty-policy/pom.xml | 3 ++- .../eclipse/jetty/policy/TestJettyPolicyRuntime.java | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/jetty-policy/pom.xml b/jetty-policy/pom.xml index c7f40177715..0a481af0de1 100644 --- a/jetty-policy/pom.xml +++ b/jetty-policy/pom.xml @@ -71,7 +71,8 @@ jar true ** - ${jetty.test.policy.loc} + ${jetty.test.policy.loc} + jetty-test-policy.jar diff --git a/jetty-policy/src/test/java/org/eclipse/jetty/policy/TestJettyPolicyRuntime.java b/jetty-policy/src/test/java/org/eclipse/jetty/policy/TestJettyPolicyRuntime.java index 49c681833da..ae21b5d7b7d 100644 --- a/jetty-policy/src/test/java/org/eclipse/jetty/policy/TestJettyPolicyRuntime.java +++ b/jetty-policy/src/test/java/org/eclipse/jetty/policy/TestJettyPolicyRuntime.java @@ -162,17 +162,22 @@ public class TestJettyPolicyRuntime extends TestCase { if ( !_runningOnWindows ) //temporary, create alternate file to load for windows { + + System.out.println( "test" ); JettyPolicy ap = new JettyPolicy( Collections.singleton( getWorkingDirectory() + "/src/test/resources/jetty-certificate.policy" ), evaluator ); + + // ap.dump( System.out ); + ap.refresh(); Policy.setPolicy( ap ); System.setSecurityManager( new SecurityManager() ); - URL url = new URL("file://" + getWorkingDirectory() + "/target/test-policy/jetty-test-policy-1.0.jar"); + URL url = new URL("file://" + getWorkingDirectory() + "/target/test-policy/jetty-test-policy.jar"); URLClassLoader loader ; if (Thread.currentThread().getContextClassLoader() != null ) @@ -227,12 +232,16 @@ public class TestJettyPolicyRuntime extends TestCase public void testBadCertificateLoader() throws Exception { + if ( !_runningOnWindows ) //temporary, create alternate file to load for windows { + JettyPolicy ap = new JettyPolicy( Collections.singleton( getWorkingDirectory() + "/src/test/resources/jetty-bad-certificate.policy" ), evaluator ); + + ap.refresh(); Policy.setPolicy( ap );