Skip to content

Commit

Permalink
[FAB-4497] Fix panic in TestEndedGoroutines
Browse files Browse the repository at this point in the history
This fixes a possible panic in the test, that is
caused by a missing length check

Change-Id: I3afd31aa4ace3ab2237b192ec9ee4090bca77d12
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Jun 11, 2017
1 parent 88b5bcb commit cd44fba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gossip/gossip/gossip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,9 @@ var clientConn = func(g goroutine) bool {
}

var testingg = func(g goroutine) bool {
if len(g.stack) == 0 {
return false
}
return strings.Index(g.stack[len(g.stack)-1], "testing.go") != -1
}

Expand Down

0 comments on commit cd44fba

Please sign in to comment.