Skip to content

Commit bfe8f19

Browse files
make getTotalNumberOfCompletedTests more robust
1 parent 5ca644e commit bfe8f19

File tree

1 file changed

+7
-1
lines changed
  • sqldev/src/main/java/org/utplsql/sqldev/model/runner

1 file changed

+7
-1
lines changed

sqldev/src/main/java/org/utplsql/sqldev/model/runner/Run.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ public int getTotalNumberOfCompletedTests() {
103103
|| counter.getError() == null) {
104104
return -1;
105105
}
106-
return counter.getDisabled() + counter.getSuccess() + counter.getFailure() + counter.getError();
106+
int total = counter.getDisabled() + counter.getSuccess() + counter.getFailure() + counter.getError();
107+
if (totalNumberOfTests != null && total > totalNumberOfTests) {
108+
// can happen when run is cancelled and two processes are updating the run in parallel
109+
// not worth to ensure consistency for this case, using synchronized will not be enough
110+
total = totalNumberOfTests;
111+
}
112+
return total;
107113
}
108114

109115
public String getReporterId() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy