From 26a7183ade1e525a7a9cd088db3a179bdccd8c2b Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Mon, 03 Mar 2014 09:50:54 +0000
Subject: [PATCH] Add workaround to make tests pass until issue OPENDJ-1361 is fixed.

---
 opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CertificateExactMatchingRuleImplTest.java      |    4 +++-
 opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/MatchingRuleTest.java                          |    3 +++
 opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/DistinguishedNameEqualityMatchingRuleTest.java |    3 +++
 3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CertificateExactMatchingRuleImplTest.java b/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CertificateExactMatchingRuleImplTest.java
index e1ca1fd..1eb2852 100644
--- a/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CertificateExactMatchingRuleImplTest.java
+++ b/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CertificateExactMatchingRuleImplTest.java
@@ -30,7 +30,6 @@
 import org.forgerock.opendj.ldap.ByteString;
 import org.forgerock.opendj.ldap.ConditionResult;
 import org.forgerock.opendj.ldap.DecodeException;
-
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
@@ -162,6 +161,9 @@
     @Test(dataProvider = "certificateExactMatchingRules")
     public void certificateExactMatchingRules(ByteString attributeValue,
             ByteString assertionValue, ConditionResult result) throws DecodeException {
+        // TODO : workaround to make test pass until issue OPENDJ-1361 is fixed
+        new SchemaBuilder("workaround").addSchema(Schema.getCoreSchema(), true).toSchema();
+
         MatchingRule rule = getRule();
 
         // normalize the 2 provided values and check that they are equal
diff --git a/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/DistinguishedNameEqualityMatchingRuleTest.java b/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/DistinguishedNameEqualityMatchingRuleTest.java
index 1d8df50..1a91ad1 100644
--- a/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/DistinguishedNameEqualityMatchingRuleTest.java
+++ b/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/DistinguishedNameEqualityMatchingRuleTest.java
@@ -190,6 +190,9 @@
      */
     @Test(dataProvider = "testDNs")
     public void testNormalization(final String value1, final String value2) throws Exception {
+        // TODO : workaround to make test pass until issue OPENDJ-1361 is fixed
+        new SchemaBuilder("workaround").addSchema(Schema.getCoreSchema(), true).toSchema();
+
         final MatchingRule rule = getRule();
         final ByteString normalizedValue1 =
                 rule.normalizeAttributeValue(ByteString.valueOf(value1));
diff --git a/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/MatchingRuleTest.java b/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/MatchingRuleTest.java
index 59e1a8b..3cf7baf 100644
--- a/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/MatchingRuleTest.java
+++ b/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/MatchingRuleTest.java
@@ -71,6 +71,9 @@
     @Test(dataProvider = "matchingrules")
     public void matchingRules(final String value1, final String value2, final ConditionResult result)
             throws Exception {
+        // TODO : workaround to make test pass until issue OPENDJ-1361 is fixed
+        new SchemaBuilder("workaround").addSchema(Schema.getCoreSchema(), true).toSchema();
+
         final MatchingRule rule = getRule();
 
         // normalize the 2 provided values and check that they are equals

--
Gitblit v1.10.0