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

test(notifications)

we expect this to fail. will be fixed in upcoming commit

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 92e2d247
......@@ -26,6 +26,29 @@ func TestPublishSubscribe(t *testing.T) {
}
func TestSubscribeMany(t *testing.T) {
e1 := blocks.NewBlock([]byte("Greetings from The Interval"))
e2 := blocks.NewBlock([]byte("Greetings from The Interval"))
n := New()
defer n.Shutdown()
ch := n.Subscribe(context.Background(), e1.Key(), e2.Key())
n.Publish(e1)
r1, ok := <-ch
if !ok {
t.Fatal("didn't receive first expected block")
}
assertBlocksEqual(t, e1, r1)
n.Publish(e2)
r2, ok := <-ch
if !ok {
t.Fatal("didn't receive second expected block")
}
assertBlocksEqual(t, e2, r2)
}
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