Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): filter tests with missing duration from duration and rawDu… #946

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ data class ExecutionReport(
}.map { it.test.toTestName() }
.toSet()

val duration = tests.map { it.durationMillis() }.sum()
val duration = tests.filter { it.isTimeInfoAvailable }
.sumOf { it.durationMillis() }

val rawTests = poolTestEvents
.map { it.testResult }
Expand All @@ -72,8 +73,7 @@ data class ExecutionReport(
val rawDuration = rawTests
//Incomplete tests mess up the calculations of time since their end time is 0 and duration is, hence, years
//We filter here for unavailable time just to be safe
.filter { it.startTime != 0L && it.endTime != 0L }
.map { it.durationMillis() }.sum()
.filter { it.isTimeInfoAvailable }.sumOf { it.durationMillis() }

val retries = tests.map { result: TestResult ->
Pair(result, poolTestEvents.filter { it.testResult.test == result.test && it.testResult !== result })
Expand Down
Loading