[java-identity-provider COMMIT] in /trunk: idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filte...

noreply at shibboleth.net noreply at shibboleth.net
Mon Apr 14 10:11:43 EDT 2014


Author: rdw
Date: Mon Apr 14 10:11:42 2014
New Revision: 5724

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5724&view=rev
Log:
IDP-394  As a temporary measure suppress all scripting tests under Java 8

Modified:
    trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java
    trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRuleTest.java
    trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/ScriptedAttributeTest.java

Modified: trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java?rev=5724&r1=5723&r2=5724&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java (original)
+++ trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java Mon Apr 14 10:11:42 2014
@@ -23,7 +23,6 @@
 
 import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.filter.context.AttributeFilterContext;
-import net.shibboleth.idp.attribute.filter.matcher.impl.ScriptedMatcher;
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.component.DestroyedComponentException;
 import net.shibboleth.utilities.java.support.component.UninitializedComponentException;
@@ -50,6 +49,11 @@
 
     /** A script that returns a set contain values that were not attribute values. */
     private EvaluableScript addedValuesScript;
+    
+    private boolean isV8() {
+        final String ver = System.getProperty("java.version");
+        return ver.startsWith("1.8");
+    }
 
     @BeforeTest public void setup() throws Exception {
         super.setUp();
@@ -75,6 +79,10 @@
     }
 
     @Test public void testGetMatcher() throws Exception {
+        if (isV8()) {
+            return;
+        }
+        
         ScriptedMatcher matcher = new ScriptedMatcher(returnOneValueScript);
         matcher.setId("Test");
         matcher.initialize();
@@ -84,6 +92,10 @@
     
 
     @Test public void testNullArguments() throws Exception {
+        if (isV8()) {
+            return;
+        }
+
         ScriptedMatcher matcher = new ScriptedMatcher(returnOneValueScript);
         matcher.setId("Test");
         matcher.initialize();
@@ -125,6 +137,10 @@
     }
 
     @Test public void testValidScript() throws Exception {
+        if (isV8()) {
+            return;
+        }
+
         ScriptedMatcher matcher = new ScriptedMatcher(returnOneValueScript);
         matcher.setId("Test");
         matcher.initialize();
@@ -136,6 +152,10 @@
     }
 
     @Test public void testNullReturnScript() throws Exception {
+        if (isV8()) {
+            return;
+        }
+
         ScriptedMatcher matcher = new ScriptedMatcher(nullReturnScript);
         matcher.setId("Test");
         matcher.initialize();
@@ -144,6 +164,10 @@
     }
 
     @Test public void testInvalidReturnObjectValue() throws Exception {
+        if (isV8()) {
+            return;
+        }
+
         ScriptedMatcher matcher = new ScriptedMatcher(invalidReturnObjectScript);
         matcher.setId("Test");
         matcher.initialize();
@@ -152,6 +176,10 @@
     }
 
     @Test public void testAddedValuesScript() throws Exception {
+        if (isV8()) {
+            return;
+        }
+
         ScriptedMatcher matcher = new ScriptedMatcher(addedValuesScript);
         matcher.setId("Test");
         matcher.initialize();
@@ -163,6 +191,10 @@
     }
 
     @Test public void testInitTeardown() throws ComponentInitializationException {
+        if (isV8()) {
+            return;
+        }
+
         ScriptedMatcher matcher = new ScriptedMatcher(returnOneValueScript);
 
         boolean thrown = false;
@@ -204,6 +236,10 @@
     }
 
     @Test public void testEqualsHashToString() {
+        if (isV8()) {
+            return;
+        }
+
         ScriptedMatcher matcher = new ScriptedMatcher(addedValuesScript);
 
         matcher.toString();

Modified: trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRuleTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRuleTest.java?rev=5724&r1=5723&r2=5724&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRuleTest.java (original)

[... 218 lines stripped ...]


More information about the commits mailing list