Skip to content

Commit cd44fba

Browse files
committed
[FAB-4497] Fix panic in TestEndedGoroutines
This fixes a possible panic in the test, that is caused by a missing length check Change-Id: I3afd31aa4ace3ab2237b192ec9ee4090bca77d12 Signed-off-by: Yacov Manevich <[email protected]>
1 parent 88b5bcb commit cd44fba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gossip/gossip/gossip_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,9 @@ var clientConn = func(g goroutine) bool {
11141114
}
11151115

11161116
var testingg = func(g goroutine) bool {
1117+
if len(g.stack) == 0 {
1118+
return false
1119+
}
11171120
return strings.Index(g.stack[len(g.stack)-1], "testing.go") != -1
11181121
}
11191122

0 commit comments

Comments
 (0)