Commit d6002bcb authored by Steven Allen's avatar Steven Allen

test: fix unused warnings

parent a884776a
...@@ -245,7 +245,7 @@ func TestTaggingPeers(t *testing.T) { ...@@ -245,7 +245,7 @@ func TestTaggingPeers(t *testing.T) {
t.Fatal("Incorrect number of peers tagged") t.Fatal("Incorrect number of peers tagged")
} }
envelope.Sent() envelope.Sent()
next = <-sanfrancisco.Engine.Outbox() <-sanfrancisco.Engine.Outbox()
sanfrancisco.PeerTagger.wait.Wait() sanfrancisco.PeerTagger.wait.Wait()
if sanfrancisco.PeerTagger.count() != 0 { if sanfrancisco.PeerTagger.count() != 0 {
t.Fatal("Peers should be untagged but weren't") t.Fatal("Peers should be untagged but weren't")
......
...@@ -188,6 +188,9 @@ func TestSessionGetBlocks(t *testing.T) { ...@@ -188,6 +188,9 @@ func TestSessionGetBlocks(t *testing.T) {
if len(receivedBlocks) != len(blks) { if len(receivedBlocks) != len(blks) {
t.Fatal("did not receive enough blocks") t.Fatal("did not receive enough blocks")
} }
if len(newCancelReqs) != len(receivedBlocks) {
t.Fatal("expected an equal number of received blocks and cancels")
}
for _, block := range receivedBlocks { for _, block := range receivedBlocks {
if !testutil.ContainsBlock(blks, block) { if !testutil.ContainsBlock(blks, block) {
t.Fatal("received incorrect block") t.Fatal("received incorrect block")
......
...@@ -17,14 +17,11 @@ import ( ...@@ -17,14 +17,11 @@ import (
) )
type fakeSession struct { type fakeSession struct {
interested []cid.Cid interested []cid.Cid
blks []blocks.Block blks []blocks.Block
fromNetwork bool id uint64
receivedBlock bool pm *fakePeerManager
updateReceiveCounters bool srs *fakeRequestSplitter
id uint64
pm *fakePeerManager
srs *fakeRequestSplitter
} }
func (*fakeSession) GetBlock(context.Context, cid.Cid) (blocks.Block, error) { func (*fakeSession) GetBlock(context.Context, cid.Cid) (blocks.Block, error) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment