Skip to content

Commit

Permalink
fix: Fix NPE in GcToolResults (#1662)
Browse files Browse the repository at this point in the history
Fixes #1649

PR adds NPE handling when fetching results

## Test Plan
> How do we know the code works?

1. build workflows finish with success
2. IT pass
  • Loading branch information
pawelpasterz authored Mar 5, 2021
1 parent d2cf060 commit fe72d53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_runner/src/main/kotlin/ftl/gc/GcToolResults.kt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ object GcToolResults {

fun listAllTestCases(results: ToolResultsStep): List<TestCase> {
var response = listTestCases(results)
val testCases = response.testCases.toMutableList()
val testCases = response.testCases.orEmpty().toMutableList()
while (response.nextPageToken != null) {
response = listTestCases(results, response.nextPageToken)
testCases += response.testCases ?: emptyList()
Expand Down

0 comments on commit fe72d53

Please sign in to comment.