Skip to content

Commit

Permalink
Fix exception thrown for null start time (#777)
Browse files Browse the repository at this point in the history
* Fix exception thrown for null start time

* Update release notes
  • Loading branch information
pawelpasterz authored and adamfilipow92 committed May 13, 2020
1 parent feafecc commit f146c48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## next (unreleased)
- [#775](https://github.com/Flank/flank/issues/775) Fix exception thrown for null start time. ([pawelpasterz](https://github.com/pawelpasterz))

## v20.05.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private suspend fun getAsync(toolResultsStep: ToolResultsStep) = coroutineScope

// Unfortunately is not possible to obtain from api exact the same timestamp as is in autogenerated test_result_1.xml from google cloud.
// This one is a little bit lower but close as possible. The difference is around ~3 seconds.
private fun List<TestCase>.getStartTimestamp(): Timestamp = minBy { testCase ->
testCase.startTime.asUnixTimestamp()
}?.startTime ?: Timestamp()
private fun List<TestCase>.getStartTimestamp(): Timestamp = this
.mapNotNull { it.startTime }
.minBy { it.asUnixTimestamp() }
?: Timestamp()

0 comments on commit f146c48

Please sign in to comment.