提交 2f4175a0 作者: Brian Tiger Chow

test(bitswap:notifications) check if chan is open

上级 a7ef0955
......@@ -18,9 +18,13 @@ func TestPublishSubscribe(t *testing.T) {
ch := n.Subscribe(context.Background(), blockSent.Key())
n.Publish(blockSent)
blockRecvd := <-ch
blockRecvd, ok := <-ch
if !ok {
t.Fail()
}
assertBlocksEqual(t, blockRecvd, blockSent)
}
func TestCarryOnWhenDeadlineExpires(t *testing.T) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论