mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
03.50.2014 ed7d018abcadd600f92da856d66145e01ee03751
Add workaround to make tests pass until issue OPENDJ-1361 is fixed.

Tests fail randomly depending on order of tests run due to this issue. The workaround
allow to ensure matching rules from the core schema are not corrupted.
3 files modified
10 ■■■■■ changed files
opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CertificateExactMatchingRuleImplTest.java 4 ●●● patch | view | raw | blame | history
opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/DistinguishedNameEqualityMatchingRuleTest.java 3 ●●●●● patch | view | raw | blame | history
opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/MatchingRuleTest.java 3 ●●●●● patch | view | raw | blame | history
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
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));
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