Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2011-01-18 23:58:57 +0000
committerRyan D. Brooks2011-01-18 23:58:57 +0000
commitaadccafcffa10e4141fd1ed2e37d239c019ed8d1 (patch)
tree7e023ad03433427adba7bb85da750838c0bedadf
parentffc94421cff19f3c0aca008b5ba711b40c81181e (diff)
downloadorg.eclipse.osee-aadccafcffa10e4141fd1ed2e37d239c019ed8d1.tar.gz
org.eclipse.osee-aadccafcffa10e4141fd1ed2e37d239c019ed8d1.tar.xz
org.eclipse.osee-aadccafcffa10e4141fd1ed2e37d239c019ed8d1.zip
bug: Fix intermittent failure in WordEditTest by tightening up its synchronization
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java
index eb174a6bb4a..2124b6c44b7 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java
@@ -139,10 +139,10 @@ public class WordEditTest {
OseeEventManager.addListener(listener);
OseeEventManager.setDisableEvents(false);
try {
- editFile.setContents(new ByteArrayInputStream(content.getBytes("UTF-8")), IResource.FORCE,
- new NullProgressMonitor());
synchronized (listener) {
- listener.wait(20000);
+ editFile.setContents(new ByteArrayInputStream(content.getBytes("UTF-8")), IResource.FORCE,
+ new NullProgressMonitor());
+ listener.wait(60000);
}
} finally {
OseeEventManager.setDisableEvents(eventBoolean);
@@ -188,7 +188,7 @@ public class WordEditTest {
private static final class UpdateArtifactListener implements IArtifactEventListener {
private final EventBasicGuidArtifact artToLookFor;
- private boolean wasUpdateReceived;
+ private volatile boolean wasUpdateReceived;
public UpdateArtifactListener(EventModType modType, Artifact artifact) {
super();
@@ -199,14 +199,14 @@ public class WordEditTest {
public void handleArtifactEvent(ArtifactEvent artifactEvent, Sender sender) {
List<EventBasicGuidArtifact> changes = artifactEvent.getArtifacts();
if (changes.contains(artToLookFor)) {
- wasUpdateReceived = true;
synchronized (this) {
+ wasUpdateReceived = true;
notify();
}
}
}
- public boolean wasUpdateReceived() {
+ public synchronized boolean wasUpdateReceived() {
return wasUpdateReceived;
}

Back to the top