Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions dot/network/stream_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ func TestStreamManager(t *testing.T) {

time.Sleep(cleanupStreamInterval * 2)
connsAToB := ha.Network().ConnsToPeer(hb.ID())
require.Equal(t, 1, len(connsAToB))
require.GreaterOrEqual(t, len(connsAToB), 1)
require.Equal(t, 0, len(connsAToB[0].GetStreams()))

connsBToA := hb.Network().ConnsToPeer(ha.ID())
require.Equal(t, 1, len(connsBToA))
require.GreaterOrEqual(t, len(connsBToA), 1)
require.Equal(t, 0, len(connsBToA[0].GetStreams()))
}

Expand All @@ -91,12 +91,12 @@ func TestStreamManager_KeepStream(t *testing.T) {
smA.start()
smB.start()

time.Sleep(cleanupStreamInterval / 2)
time.Sleep(cleanupStreamInterval / 3)
connsAToB := ha.Network().ConnsToPeer(hb.ID())
require.Equal(t, 1, len(connsAToB))
require.GreaterOrEqual(t, len(connsAToB), 1)
require.Equal(t, 1, len(connsAToB[0].GetStreams()))

connsBToA := hb.Network().ConnsToPeer(ha.ID())
require.Equal(t, 1, len(connsBToA))
require.GreaterOrEqual(t, len(connsBToA), 1)
require.Equal(t, 1, len(connsBToA[0].GetStreams()))
}