Commit abdf5c87 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Jeromy

tests(bitswap/notifications) test niladic

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 097bc1b4
......@@ -49,6 +49,15 @@ func TestSubscribeMany(t *testing.T) {
assertBlocksEqual(t, e2, r2)
}
func TestSubscribeIsANoopWhenCalledWithNoKeys(t *testing.T) {
n := New()
defer n.Shutdown()
ch := n.Subscribe(context.TODO()) // no keys provided
if _, ok := <-ch; ok {
t.Fatal("should be closed if no keys provided")
}
}
func TestCarryOnWhenDeadlineExpires(t *testing.T) {
impossibleDeadline := time.Nanosecond
......
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