Skip to content

Commit

Permalink
include aborted in the ProgressRecord total count (#5365) [ci fast]
Browse files Browse the repository at this point in the history
Signed-off-by: jorgee <[email protected]>
  • Loading branch information
jorgee authored Oct 11, 2024
1 parent 84cce08 commit 8eb0c39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ProgressRecord implements Cloneable {

int getTotalCount() {
pending+ submitted+ running+
succeeded+ failed+ cached+ stored
succeeded+ failed+ cached+ stored + aborted
}

int getCompletedCount() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class ProgressRecordTest extends Specification {
def FAILED =5
def CACHED =6
def STORED =7
def ABORTED = 8
and:
def rec = new ProgressRecord(10, 'foo')

Expand All @@ -71,10 +72,11 @@ class ProgressRecordTest extends Specification {
rec.failed =FAILED
rec.cached =CACHED
rec.stored =STORED
rec.aborted = ABORTED

then:
rec.getCompletedCount() == SUCCEEDED+ FAILED+ CACHED+ STORED
rec.getTotalCount() == PENDING+ SUBMITTED+ RUNNING + SUCCEEDED+ FAILED+ CACHED+ STORED
rec.getTotalCount() == PENDING+ SUBMITTED+ RUNNING + SUCCEEDED+ FAILED+ CACHED+ STORED+ ABORTED
}


Expand Down

0 comments on commit 8eb0c39

Please sign in to comment.