You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2020/05/02 09:27:11 UTC
[directory-studio] branch master updated: Add wait time and fix
typos
This is an automated email from the ASF dual-hosted git repository.
seelmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-studio.git
The following commit(s) were added to refs/heads/master by this push:
new 95090af Add wait time and fix typos
95090af is described below
commit 95090af03411e89ceebde306b16c731ba785e9a1
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Sat May 2 11:26:58 2020 +0200
Add wait time and fix typos
---
.../directory/studio/test/integration/ui/CopyEntryTest.java | 2 +-
.../directory/studio/test/integration/ui/bots/BrowserViewBot.java | 1 -
.../studio/test/integration/ui/bots/ModificationLogsViewBot.java | 2 +-
.../studio/test/integration/ui/bots/utils/JobWatcher.java | 8 ++++----
4 files changed, 6 insertions(+), 7 deletions(-)
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 cafe850..1d4902f 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
@@ -305,7 +305,7 @@ public class CopyEntryTest extends AbstractLdapTestUnit
// paste the entries
browserViewBot.pasteEntries( 3 );
- // verify the entries was copied
+ // verify the entries were copied
assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=target", "cn=alias" ) );
assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=target", "cn=referral" ) );
assertTrue( browserViewBot.existsEntry( "DIT", "Root DSE", "ou=system", "ou=target", "cn=subentry" ) );
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserViewBot.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserViewBot.java
index 2fb4712..e26dfea 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserViewBot.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserViewBot.java
@@ -210,7 +210,6 @@ public class BrowserViewBot
JobWatcher watcher = new JobWatcher( BrowserCoreMessages.jobs__copy_entries_name_1 );
ContextMenuHelper.clickContextMenu( browserBot.getTree(), "Paste" );
watcher.waitUntilDone();
-
}
}
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ModificationLogsViewBot.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ModificationLogsViewBot.java
index a9b50b5..397b9b9 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ModificationLogsViewBot.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ModificationLogsViewBot.java
@@ -87,7 +87,7 @@ public class ModificationLogsViewBot extends AbstractLogsViewBot
return;
}
}
- throw new AssertionError( "Expeted to find all parts " + parts + " in\n" + text );
+ throw new AssertionError( "Expected to find all parts " + parts + " in\n" + text );
}
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/utils/JobWatcher.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/utils/JobWatcher.java
index 9744b5e..41fd0da 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/utils/JobWatcher.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/utils/JobWatcher.java
@@ -20,7 +20,6 @@
package org.apache.directory.studio.test.integration.ui.bots.utils;
-import java.time.Instant;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -28,6 +27,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.directory.studio.common.core.jobs.StudioJob;
import org.apache.directory.studio.connection.core.jobs.StudioConnectionRunnableWithProgress;
import org.apache.directory.studio.connection.ui.RunnableContextRunner;
+import org.apache.directory.studio.test.integration.ui.bots.BotUtils;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobManager;
@@ -52,7 +52,6 @@ public class JobWatcher
private final RunnableContextRunner.Listener runnnableContextRunnerListener;
private final List<String> jobNames;
-
private void removeListeners()
{
jobManager.removeJobChangeListener( jobChangeListener );
@@ -119,11 +118,9 @@ public class JobWatcher
public void waitUntilDone()
{
// System.out.println( "Wait for jobs: " + jobNames );
- Instant start = Instant.now();
SWTBot bot = new SWTBot();
bot.waitUntil( new DefaultCondition()
{
-
public boolean test() throws Exception
{
if ( done.get() )
@@ -143,5 +140,8 @@ public class JobWatcher
return "Waited for jobs " + jobNames + " to finish";
}
}, SWTBotPreferences.TIMEOUT * 4 );
+
+ // Wait a bit longer after job is done to allow UI update
+ BotUtils.sleep( 1000L );
}
}