Skip to content

Commit 084ceff

Browse files
committed
Fix parse
1 parent 50b12ab commit 084ceff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/flakeguard/runner/runner.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,10 @@ func parseTestResults(expectedRuns int, filePaths []string) ([]reports.TestResul
401401
if parentTestResult, exists := testDetails[parentTestKey]; exists {
402402
if parentTestResult.Panic {
403403
for _, subTest := range subTests {
404-
subTestKey := fmt.Sprintf("%s/%s", parentTestResult.TestPackage, subTest)
404+
// Include parent test name in subTestKey
405+
subTestKey := fmt.Sprintf("%s/%s/%s", parentTestResult.TestPackage, parentTestResult.TestName, subTest)
405406
if subTestResult, exists := testDetails[subTestKey]; exists {
406-
if subTestResult.Failures > 0 { // If the parent test panicked, any of its subtests that failed could be the culprit
407+
if subTestResult.Failures > 0 {
407408
subTestResult.Panic = true
408409
subTestResult.Outputs = append(subTestResult.Outputs, "Panic in parent test")
409410
}

0 commit comments

Comments
 (0)