Skip to content

Commit

Permalink
fix: flaky TestLibp2pCarServerNewTransferCancelsPreviousTransfer (#1350)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc committed Apr 4, 2023
1 parent 3403cbb commit b6dd08b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions transport/httptransport/libp2p_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ func TestLibp2pCarServerNewTransferCancelsPreviousTransfer(t *testing.T) {
require.NotEmpty(t, clientEvts1)
lastClientEvt1 := clientEvts1[len(clientEvts1)-1]
// It's possible the transfer finishes successfully before it gets cancelled
if lastClientEvt1.Error == nil {
require.Equal(t, carSize, int(lastClientEvt1.NBytesReceived))
} else {
if lastClientEvt1.Error != nil {
require.Error(t, lastClientEvt1.Error)
require.Less(t, int(clientReceived), carSize)
}
Expand Down

0 comments on commit b6dd08b

Please sign in to comment.