Skip to content

Commit

Permalink
test fail logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Dec 5, 2024
1 parent 907fad9 commit 1483026
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bitswap/client/internal/session/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ func TestSessionFailingToGetFirstBlock(t *testing.T) {
// Tick should take longer
consecutiveTickLength := time.Since(startTick)
if firstTickLength > consecutiveTickLength {
t.Log("prev tick:", firstTickLength, "this tick:", consecutiveTickLength)
t.Fatal("Should have increased tick length after first consecutive tick")
}

Expand All @@ -432,7 +433,8 @@ func TestSessionFailingToGetFirstBlock(t *testing.T) {
// Tick should take longer
secondConsecutiveTickLength := time.Since(startTick)
if consecutiveTickLength > secondConsecutiveTickLength {
t.Fatal("Should have increased tick length after first consecutive tick")
t.Log("prev tick:", consecutiveTickLength, "this tick:", secondConsecutiveTickLength)
t.Fatal("Should have increased tick length after previous consecutive tick")
}

// Should not have tried to find peers on consecutive ticks
Expand Down

0 comments on commit 1483026

Please sign in to comment.