adjust total test count if already collected number of tests greater than it
diff --git a/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/model/TestRunSession.java b/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/model/TestRunSession.java
index 18c82c4..7d9b091 100755
--- a/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/model/TestRunSession.java
+++ b/core/plugins/org.eclipse.dltk.testing/src/org/eclipse/dltk/internal/testing/model/TestRunSession.java
@@ -336,6 +336,15 @@
// System.out.println("COUNT:" + count);
}
+ /**
+ * @param value
+ */
+ protected void adjustTotalCount(int value) {
+ if (value > fTotalCount) {
+ fTotalCount = value;
+ }
+ }
+
/* (non-Javadoc)
* @see org.eclipse.dltk.internal.testing.model.ITestSession#getStartTime()
*/
@@ -528,6 +537,9 @@
int testCount= Integer.parseInt(treeEntry.substring(index2 + 1));
+ if (isSuite && testCount > 1) {
+ adjustTotalCount(fStartedCount + testCount);
+ }
if (fIncompleteTestSuites.isEmpty()) {
return createTestElement(fTestRoot, id, testName, isSuite, testCount);
} else {
@@ -685,6 +697,7 @@
setStatus(testCaseElement, Status.RUNNING);
fStartedCount++;
+ adjustTotalCount(fStartedCount);
Object[] listeners= fSessionListeners.getListeners();
for (int i= 0; i < listeners.length; ++i) {