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-04 08:02:20 +0300
committerStefan Seelmann <mail@stefan-seelmann.de>2021-05-04 08:02:20 +0300
commit403459df4d66965800040a6351057497339844b2 (patch)
tree47343bbff4ecaeb91f9fa2e99ef0dc27f8bebf88
parent90dba262315f37051ab0207c57c8e9c0c57e6501 (diff)
Fix flaky test
-rw-r--r--tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java
index 918a14c78..de7aeee64 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java
@@ -38,8 +38,8 @@ import org.apache.directory.studio.connection.core.Connection;
import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
import org.apache.directory.studio.connection.core.ConnectionManager;
import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
+import org.apache.directory.studio.test.integration.junit5.Constants;
import org.apache.directory.studio.test.integration.junit5.LdapServersSource;
-import org.apache.directory.studio.test.integration.junit5.LdapServersSource.Mode;
import org.apache.directory.studio.test.integration.junit5.TestLdapServer;
import org.apache.directory.studio.test.integration.ui.bots.NewConnectionWizardBot;
import org.apache.mina.util.AvailablePortFinder;
@@ -379,18 +379,17 @@ public class NewConnectionWizardTest extends AbstractTestBase
/**
* Tests the "Check Network Parameter" button.
*/
- @ParameterizedTest
- @LdapServersSource(mode = Mode.All)
- public void testCheckNetworkParameterButtonNotOK( TestLdapServer server )
+ @Test
+ public void testCheckNetworkParameterButtonNotOK()
{
// enter connection parameter with invalid port
wizardBot.typeConnectionName( getConnectionName() );
- wizardBot.typeHost( server.getHost() );
- wizardBot.typePort( AvailablePortFinder.getNextAvailable( server.getPort() ) );
+ wizardBot.typeHost( Constants.LOCALHOST );
+ wizardBot.typePort( AvailablePortFinder.getNextAvailable( 1024 ) );
// click "Check Network Parameter" button and get the result
String result1 = wizardBot.clickCheckNetworkParameterButton();
- assertNotNull( "Expected Error", result1 );
+ assertNotNull( result1 );
// LDAP API: Connection refused
// JNDI: The connection failed
assertThat( result1,
@@ -399,7 +398,7 @@ public class NewConnectionWizardTest extends AbstractTestBase
// enter connection parameter with invalid host name
String hostname = "qwertzuiop.asdfghjkl.yxcvbnm";
wizardBot.typeHost( hostname );
- wizardBot.typePort( server.getPort() );
+ wizardBot.typePort( 389 );
// click "Check Network Parameter" button and get the result
String result2 = wizardBot.clickCheckNetworkParameterButton();
@@ -472,7 +471,7 @@ public class NewConnectionWizardTest extends AbstractTestBase
// click "Check Network Parameter" button
String result = wizardBot.clickCheckAuthenticationButton();
- assertNotNull( "Expected Error", result );
+ assertNotNull( result );
assertThat( result, containsString( "[LDAP result code 49 - invalidCredentials]" ) );
wizardBot.clickCancelButton();