mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-26 04:47:45 +08:00
tests(bitswap/notifications) test niladic
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
parent
03324f7765
commit
a5fccaccee
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user