test(bitswap) Close (but skip for now)
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committed
Nov 20, 2014 at 19:12 UTC
ab201c15bb4ac20870f9b473be91947930f979cf
1 file changed
+15
exchange/bitswap/bitswap_test.go
+15
@@ -18,6 +18,21 @@ import (
18
mock "github.com/jbenet/go-ipfs/routing/mock"
19
)
20
21
+func TestClose(t *testing.T) {
22
+ // TODO
23
+ t.Skip("TODO Bitswap's Close implementation is a WIP")
24
+ vnet := tn.VirtualNetwork()
25
+ rout := mock.VirtualRoutingServer()
26
+ sesgen := NewSessionGenerator(vnet, rout)
27
+ bgen := NewBlockGenerator()
28
+
29
+ block := bgen.Next()
30
+ bitswap := sesgen.Next()
31
+
32
+ bitswap.exchange.Close()
33
+ bitswap.exchange.GetBlock(context.Background(), block.Key())
34
+}
35
+
36
func TestGetBlockTimeout(t *testing.T) {
37
38
net := tn.VirtualNetwork()