Bug 455542 - Antui Performance test throw
java.lang.IllegalMonitorStateException
Change-Id: Ifbdffdd9f63a13eab6de50073594bcd44ca57b07
Signed-off-by: David Williams <david_williams@us.ibm.com>
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/OpenAntEditorTest.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/OpenAntEditorTest.java
index 3fdf6e0..d5e874d 100644
--- a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/OpenAntEditorTest.java
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/OpenAntEditorTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -77,7 +77,7 @@
return ResourcesPlugin.getWorkspace().getRoot().getProject(ProjectHelper.PROJECT_NAME);
}
- protected void measureOpenInEditor(IFile file) throws PartInitException, InterruptedException {
+ synchronized protected void measureOpenInEditor(IFile file) throws PartInitException, InterruptedException {
try {
for (int i = 0; i < 15; i++) {
startMeasuring();
@@ -85,7 +85,7 @@
stopMeasuring();
EditorTestHelper.closeAllEditors();
wait(2000); // NOTE: runnables posted from other threads, while the main thread waits here, are executed and measured only in the next
- // iteration
+ // iteration
}
commitMeasurements();
assertPerformance();