Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/apache/directory-studio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Seelmann <mail@stefan-seelmann.de>2021-05-02 22:41:55 +0300
committerStefan Seelmann <mail@stefan-seelmann.de>2021-05-02 22:41:55 +0300
commit7720be3447e1ff43d530c4ff5776a1c27822c132 (patch)
tree93c514dd4b842ef7a98a735a0290c8a0c34387ef
parentb8b4574bea75ac9afafa505354590de1b1075be1 (diff)
Run each test only against one randomly selected server
-rw-r--r--tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java6
-rw-r--r--tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersArgumentsProvider.java41
-rw-r--r--tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersSource.java5
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/BrowserTest.java12
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java20
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CopyEntryTest.java2
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java13
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ErrorHandlingTest.java2
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ExtendedOperationsTest.java8
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java8
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewEntryWizardTest.java9
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RenameEntryTest.java6
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaBrowserTest.java2
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaEditorTest.java6
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java2
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SwtResourcesTest.java6
16 files changed, 78 insertions, 70 deletions
diff --git a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java
index ec475be76..3b2744ed8 100644
--- a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java
+++ b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java
@@ -939,8 +939,7 @@ public class DirectoryApiConnectionWrapperTest
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.ApacheDS, LdapServerType.OpenLdap })
+ @LdapServersSource(except = LdapServerType.Fedora389ds, reason = "389ds requires secure connection")
public void testPasswordModifyRequestExtendedOperation_UserChangesOwnPassword( TestLdapServer ldapServer )
throws Exception
{
@@ -999,8 +998,7 @@ public class DirectoryApiConnectionWrapperTest
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.OpenLdap, LdapServerType.Fedora389ds })
+ @LdapServersSource(except = LdapServerType.ApacheDS, reason = "OSGi issue when using WhoAmI extended operation in ApacheDS")
public void testWhoAmIExtendedOperation( TestLdapServer ldapServer ) throws Exception
{
LdapApiService ldapApiService = LdapApiServiceFactory.getSingleton();
diff --git a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersArgumentsProvider.java b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersArgumentsProvider.java
index 1cda1759b..f37725a76 100644
--- a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersArgumentsProvider.java
+++ b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersArgumentsProvider.java
@@ -23,7 +23,10 @@ package org.apache.directory.studio.test.integration.junit5;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
+import java.util.Random;
+import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.junit.jupiter.api.extension.ExtensionContext;
@@ -37,31 +40,47 @@ public class LdapServersArgumentsProvider implements ArgumentsProvider
@Override
public Stream<Arguments> provideArguments( ExtensionContext context ) throws Exception
{
- List<LdapServerType> types = Arrays
- .asList( context.getTestMethod().get().getAnnotation( LdapServersSource.class ).types() );
+ // Determine possible server types by checking only/except annotation attributes
+ LdapServersSource annotation = context.getTestMethod().get().getAnnotation( LdapServersSource.class );
+ List<LdapServerType> types = new ArrayList<>();
+ types.addAll( Arrays.asList( annotation.only() ) );
+ if ( types.isEmpty() )
+ {
+ types.addAll( Arrays.asList( LdapServerType.values() ) );
+ }
+ types.removeAll( Arrays.asList( annotation.except() ) );
- List<Arguments> arguments = new ArrayList<>();
+ // Filter available server types
+ List<LdapServerType> available = types.stream().filter( type -> type.getLdapServer().isAvailable() )
+ .collect( Collectors.toList() );
- for ( LdapServerType type : LdapServerType.values() )
+ if ( !available.isEmpty() )
{
- if ( types.contains( type ) )
+ // Pick a random one
+ available = Collections.singletonList( available.get( new Random().nextInt( available.size() ) ) );
+
+ // Prepare the available servers
+ for ( LdapServerType type : available )
{
try
{
- if ( type.getLdapServer().isAvailable() )
- {
- type.getLdapServer().prepare();
- }
- arguments.add( Arguments.of( type.getLdapServer() ) );
+ type.getLdapServer().prepare();
}
catch ( Exception e )
{
throw new RuntimeException( "Prepare failed for LDAP server type " + type, e );
}
}
+
+ // Return the available/picked servers
+ return available.stream().map( LdapServerType::getLdapServer ).map( Arguments::of );
+ }
+ else
+ {
+ // Return all types even if not available, will be skipped in SkipTestIfLdapServerIsNotAvailableInterceptor
+ return types.stream().map( LdapServerType::getLdapServer ).map( Arguments::of );
}
- return arguments.stream();
}
}
diff --git a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersSource.java b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersSource.java
index 9673561f5..dd391cda8 100644
--- a/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersSource.java
+++ b/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/junit5/LdapServersSource.java
@@ -36,6 +36,7 @@ import org.junit.jupiter.params.provider.ArgumentsSource;
@ArgumentsSource(LdapServersArgumentsProvider.class)
public @interface LdapServersSource
{
- LdapServerType[] types() default
- { LdapServerType.ApacheDS, LdapServerType.OpenLdap, LdapServerType.Fedora389ds };
+ LdapServerType[] only() default {};
+ LdapServerType[] except() default {};
+ String reason() default "";
}
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/BrowserTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/BrowserTest.java
index f8f2c1dd5..ca4255b43 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/BrowserTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/BrowserTest.java
@@ -464,8 +464,10 @@ public class BrowserTest extends AbstractTestBase
* Test for DIRSTUDIO-1172: Studio doesn't display entries with trailing =.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
- // Empty RDN value is not supported by OpenLDAP and 389ds
+ @LdapServersSource(except =
+ {
+ LdapServerType.OpenLdap,
+ LdapServerType.Fedora389ds }, reason = "Empty RDN value is not supported by OpenLDAP and 389ds")
public void testBrowseDnWithEmptyRdnValue( TestLdapServer server ) throws Exception
{
@@ -705,9 +707,7 @@ public class BrowserTest extends AbstractTestBase
* Browse and refresh entry with multi-valued RDN with same attribute type.
*/
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.ApacheDS, LdapServerType.Fedora389ds })
- // Multi-valued RDN with same attribute is not supported by OpenLDAP
+ @LdapServersSource(except = LdapServerType.OpenLdap, reason = "Multi-valued RDN with same attribute is not supported by OpenLDAP")
public void testBrowseAndRefreshEntryWithMvRdn( TestLdapServer server ) throws Exception
{
Dn entryDn = dn( "l=Berlin+l=Brandenburger Tor+l=de+l=eu", MISC_DN );
@@ -792,7 +792,7 @@ public class BrowserTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testBrowseSubEntry( TestLdapServer server ) throws Exception
{
Dn subentryDn = dn( "cn=subentry", MISC_DN );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
index 00f9d7091..aefe7d6b2 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
@@ -329,7 +329,7 @@ public class CertificateValidationTest extends AbstractTestBase
* Tests ldaps:// with a valid certificate.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testLdapsCertificateValidationOK( ApacheDirectoryServer server ) throws Exception
{
server.setKeystore( VALID_KEYSTORE_PATH );
@@ -347,7 +347,7 @@ public class CertificateValidationTest extends AbstractTestBase
* Tests ldaps:// with an expired certificate.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testLdapsCertificateValidationExpired( ApacheDirectoryServer server ) throws Exception
{
server.setKeystore( EXPIRED_KEYSTORE_PATH );
@@ -486,7 +486,7 @@ public class CertificateValidationTest extends AbstractTestBase
* by putting the root certificate into a temporary key store.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testStartTlsCertificateValidationOK( ApacheDirectoryServer server ) throws Exception
{
server.setKeystore( VALID_KEYSTORE_PATH );
@@ -519,7 +519,7 @@ public class CertificateValidationTest extends AbstractTestBase
* DIRSTUDIO-1205: SSL/TLS with small key size is not working.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testStartTlsCertificateValidationSmallKeysizeError( ApacheDirectoryServer server ) throws Exception
{
server.setKeystore( SMALL_KEYSIZE_KEYSTORE_PATH );
@@ -546,7 +546,7 @@ public class CertificateValidationTest extends AbstractTestBase
* Tests StartTLS with an expired certificate.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testStartTlsCertificateValidationExpired( ApacheDirectoryServer server ) throws Exception
{
server.setKeystore( EXPIRED_KEYSTORE_PATH );
@@ -571,7 +571,7 @@ public class CertificateValidationTest extends AbstractTestBase
* Tests StartTLS with an not yet valid certificate.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testStartTlsCertificateValidationNotYetValid( ApacheDirectoryServer server ) throws Exception
{
server.setKeystore( NOT_YET_VALID_KEYSTORE_PATH );
@@ -597,7 +597,7 @@ public class CertificateValidationTest extends AbstractTestBase
* doesn't match the server's host name (localhost)
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testStartTlsCertificateValidationHostnameMismatch( ApacheDirectoryServer server ) throws Exception
{
server.setKeystore( WRONG_HOSTNAME_KEYSTORE_PATH );
@@ -622,7 +622,7 @@ public class CertificateValidationTest extends AbstractTestBase
* Tests StartTLS with a certificate without valid certification path.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testStartTlsCertificateValidationNoValidCertificationPath( ApacheDirectoryServer server )
throws Exception
{
@@ -649,7 +649,7 @@ public class CertificateValidationTest extends AbstractTestBase
* Tests StartTLS with a self-signed certificate.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testStartTlsCertificateValidationSelfSigned( ApacheDirectoryServer server ) throws Exception
{
server.setKeystore( SELF_SIGNED_KEYSTORE_PATH );
@@ -675,7 +675,7 @@ public class CertificateValidationTest extends AbstractTestBase
* Tests StartTLS with a certificate with multiple issues.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "Update of keystore only implemented for ApacheDS")
public void testStartTlsCertificateValidationExpiredAndWrongHostnameAndSelfSigned( ApacheDirectoryServer server )
throws Exception
{
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CopyEntryTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CopyEntryTest.java
index 7da7a451c..73b56793e 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CopyEntryTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CopyEntryTest.java
@@ -294,7 +294,7 @@ public class CopyEntryTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testCopyPasteSubentry( TestLdapServer server ) throws Exception
{
// enable Subentries control
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java
index 31a12e316..3daa7ae73 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/EntryEditorTest.java
@@ -245,8 +245,7 @@ public class EntryEditorTest extends AbstractTestBase
* DIRSTUDIO-1267:Test adding, editing and deleting of attributes with language tag in the entry editor.
*/
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.OpenLdap, LdapServerType.Fedora389ds })
+ @LdapServersSource(except = LdapServerType.ApacheDS, reason = "Language tags not yet supported by ApacheDS")
public void testAddEditDeleteAttributeWithLanguageTag( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -696,7 +695,7 @@ public class EntryEditorTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testAciItemEditorAllOptions( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -773,7 +772,7 @@ public class EntryEditorTest extends AbstractTestBase
* Test for DIRSTUDIO-1135
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testAciItemEditorAllAttributesValuesParser( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -810,7 +809,7 @@ public class EntryEditorTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testAciItemEditorEntryAci( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -852,7 +851,7 @@ public class EntryEditorTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testAciItemEditorPrescriptiveAci( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -883,7 +882,7 @@ public class EntryEditorTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testSubtreeSpecificationEditor( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ErrorHandlingTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ErrorHandlingTest.java
index c230f0b6d..c92089ccb 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ErrorHandlingTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ErrorHandlingTest.java
@@ -46,7 +46,7 @@ public class ErrorHandlingTest extends AbstractTestBase
{
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testDeleteObjectClassTopSchemaEntryShouldFail( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ExtendedOperationsTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ExtendedOperationsTest.java
index 325e6b438..756fdc018 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ExtendedOperationsTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ExtendedOperationsTest.java
@@ -120,8 +120,7 @@ public class ExtendedOperationsTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.ApacheDS, LdapServerType.OpenLdap })
+ @LdapServersSource(except = LdapServerType.Fedora389ds, reason = "389ds requires secure connection")
public void testPasswordModifyExtendedOperationDialogSetNewPassword( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -154,8 +153,7 @@ public class ExtendedOperationsTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.ApacheDS, LdapServerType.OpenLdap })
+ @LdapServersSource(except = LdapServerType.Fedora389ds, reason = "389ds requires secure connection")
public void testPasswordModifyExtendedOperationDialogGenerateNewPassword( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -204,7 +202,7 @@ public class ExtendedOperationsTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.Fedora389ds)
+ @LdapServersSource(only = LdapServerType.Fedora389ds, reason = "389ds requires secure connection")
public void testPasswordModifyExtendedOperationRequiresSecureConnection( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
index a1fa7d9ef..33bf46bd6 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
@@ -286,7 +286,7 @@ public class ImportExportTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testExportImportLdifSubentry( TestLdapServer server ) throws Exception
{
Connection connection = connectionsViewBot.createTestConnection( server );
@@ -435,7 +435,7 @@ public class ImportExportTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testExportImportDsmlSubentry( TestLdapServer server ) throws Exception
{
Connection connection = connectionsViewBot.createTestConnection( server );
@@ -507,7 +507,7 @@ public class ImportExportTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testExportWithPagedResultControl( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -545,7 +545,7 @@ public class ImportExportTest extends AbstractTestBase
* show the new context entry in the LDAP Browser view.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testImportContextEntryRefreshesRootDSE( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewEntryWizardTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewEntryWizardTest.java
index a1abfb567..a9ffa6884 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewEntryWizardTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewEntryWizardTest.java
@@ -158,8 +158,7 @@ public class NewEntryWizardTest extends AbstractTestBase
* retrieved entries still are in upper case.
*/
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.ApacheDS, LdapServerType.Fedora389ds })
+ @LdapServersSource(except = LdapServerType.OpenLdap, reason = "Attributes type is not case sensitive in OpenLDAP")
public void testCreateUpperCaseOrganizationEntries( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -276,7 +275,7 @@ public class NewEntryWizardTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testCreateSubEntry( TestLdapServer server ) throws Exception
{
// set Subentries control
@@ -529,9 +528,7 @@ public class NewEntryWizardTest extends AbstractTestBase
* Create and browse entry with multi-valued RDN with same attribute type.
*/
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.ApacheDS, LdapServerType.Fedora389ds })
- // Multi-valued RDN with same attribute is not supported by OpenLDAP
+ @LdapServersSource(except = LdapServerType.OpenLdap, reason = "Multi-valued RDN with same attribute is not supported by OpenLDAP")
public void testCreateMvRdnWithSameAttribute( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RenameEntryTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RenameEntryTest.java
index f4f44df13..fe587f789 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RenameEntryTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RenameEntryTest.java
@@ -147,8 +147,7 @@ public class RenameEntryTest extends AbstractTestBase
* Rename an entry with leading and trailing space in RDN.
*/
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.ApacheDS, LdapServerType.OpenLdap })
+ @LdapServersSource(except = LdapServerType.Fedora389ds, reason = "Leading and trailing space is trimmed by 389ds")
public void testRenameRdnWithTrailingSpace( TestLdapServer server ) throws Exception
{
Dn oldDn = DN_WITH_LEADING_SHARP_BACKSLASH_PREFIXED;
@@ -180,8 +179,7 @@ public class RenameEntryTest extends AbstractTestBase
* Rename an entry with leading and trailing space in RDN.
*/
@ParameterizedTest
- @LdapServersSource(types =
- { LdapServerType.ApacheDS, LdapServerType.OpenLdap })
+ @LdapServersSource(except = LdapServerType.Fedora389ds, reason = "Leading and trailing space is trimmed by 389ds")
public void testRenameRdnWithLeadingAndTrailingSpace( TestLdapServer server ) throws Exception
{
Dn oldDn = DN_WITH_LEADING_SHARP_BACKSLASH_PREFIXED;
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaBrowserTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaBrowserTest.java
index 2dae64c1f..e8c0e04fb 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaBrowserTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaBrowserTest.java
@@ -66,7 +66,7 @@ public class SchemaBrowserTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.OpenLdap)
+ @LdapServersSource(only = LdapServerType.OpenLdap, reason = "OpenLDAP specific test")
public void testNoPermissionToReadSchema( TestLdapServer server ) throws Exception
{
Connection connection = connectionsViewBot.createTestConnection( server );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaEditorTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaEditorTest.java
index cc45e26cb..e672ffa8b 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaEditorTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SchemaEditorTest.java
@@ -161,7 +161,7 @@ public class SchemaEditorTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specific test")
public void testCreateSchemaOnlineApacheDS( TestLdapServer server ) throws Exception
{
studioBot.resetLdapPerspective();
@@ -193,7 +193,7 @@ public class SchemaEditorTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.OpenLdap)
+ @LdapServersSource(only = LdapServerType.OpenLdap, reason = "OpenLDAP specific test")
public void testCreateSchemaOnlineOpenLDAP( TestLdapServer server ) throws Exception
{
studioBot.resetLdapPerspective();
@@ -219,7 +219,7 @@ public class SchemaEditorTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.Fedora389ds)
+ @LdapServersSource(only = LdapServerType.Fedora389ds, reason = "389ds specific test")
public void testCreateSchemaOnline389ds( TestLdapServer server ) throws Exception
{
studioBot.resetLdapPerspective();
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
index 72401697d..24fff97a4 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SearchTest.java
@@ -303,7 +303,7 @@ public class SearchTest extends AbstractTestBase
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource(only = LdapServerType.ApacheDS, reason = "ApacheDS specifc test")
public void testSearchSubentry( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SwtResourcesTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SwtResourcesTest.java
index d524c4e5c..b4162a121 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SwtResourcesTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SwtResourcesTest.java
@@ -22,11 +22,9 @@ package org.apache.directory.studio.test.integration.ui;
import static org.apache.directory.studio.test.integration.junit5.TestFixture.MISC_DN;
-
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
-import org.apache.directory.studio.test.integration.junit5.LdapServerType;
import org.apache.directory.studio.test.integration.junit5.LdapServersSource;
import org.apache.directory.studio.test.integration.junit5.TestLdapServer;
import org.apache.directory.studio.test.integration.ui.bots.DeleteDialogBot;
@@ -54,7 +52,7 @@ public class SwtResourcesTest extends AbstractTestBase
* allocate too much SWT resources during the run.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource
public void testSwtResourcesDelta( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );
@@ -86,7 +84,7 @@ public class SwtResourcesTest extends AbstractTestBase
* complete test suite.
*/
@ParameterizedTest
- @LdapServersSource(types = LdapServerType.ApacheDS)
+ @LdapServersSource
public void testSwtResourcesCount( TestLdapServer server ) throws Exception
{
connectionsViewBot.createTestConnection( server );