aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2018-06-29 05:46:22 -0400
committerLars Vogel2018-06-29 05:46:22 -0400
commitac21f7c9e03af8f31df9a3682264a61ad560b719 (patch)
tree5f3589049029aaaa1454c4794e737bcba50d2d3d
parentff6bfa632ace88b1561dd770b255544afa9ab09b (diff)
downloadeclipse.platform.runtime-ac21f7c9e03af8f31df9a3682264a61ad560b719.zip
eclipse.platform.runtime-ac21f7c9e03af8f31df9a3682264a61ad560b719.tar.gz
eclipse.platform.runtime-ac21f7c9e03af8f31df9a3682264a61ad560b719.tar.xz
Change-Id: I99d0c39957621df3169fecb0fd3c76e12daba115 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/FussyProgressMonitor.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/FussyProgressMonitor.java b/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/FussyProgressMonitor.java
index f8e9617..05d2c37 100644
--- a/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/FussyProgressMonitor.java
+++ b/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/FussyProgressMonitor.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.core.tests.harness;
+import static org.junit.Assert.assertFalse;
+
import junit.framework.AssertionFailedError;
import org.eclipse.core.runtime.jobs.Job;
@@ -88,12 +90,7 @@ public class FussyProgressMonitor extends TestProgressMonitor {
@Override
public void beginTask(String name, int newTotalWork) {
- //if (beginTaskCalled && doneCalls > 0) {
- // this is a second call to beginTask which is allowed because
- // the previous task is done.
- //prepare();
- //}
- assertTrue("beginTask may only be called once (old name=" + taskName + ")", beginTaskCalled == false);
+ assertFalse("beginTask may only be called once (old name=" + taskName + ")", beginTaskCalled);
beginTaskCalled = true;
taskName = name;
assertTrue("total work must be positive or UNKNOWN", newTotalWork > 0 || newTotalWork == UNKNOWN);
@@ -128,8 +125,6 @@ public class FussyProgressMonitor extends TestProgressMonitor {
* should be called before every use of a FussyProgressMonitor
*/
public void prepare() {
- //if (!sanityCheckCalled)
- //EclipseWorkspaceTest.log("sanityCheck has not been called for previous use");
sanityCheckCalled = false;
taskName = null;
totalWork = 0;
@@ -147,7 +142,6 @@ public class FussyProgressMonitor extends TestProgressMonitor {
CoreTest.debug("sanityCheck has already been called");
}
sanityCheckCalled = true;
- // EclipseWorkspaceTest.log("sanity checking: " + taskName + " : " + (System.currentTimeMillis() - beginTime) + " ms, " + workedSoFar);
long duration = System.currentTimeMillis() - beginTime;
if (duration > NOTICEABLE_DELAY && beginTaskCalled) {
assertTrue("this operation took: " + duration + "ms, it should report progress", workedSoFar > 0);