提交 d5e7fd67 作者: Brian Tiger Chow 提交者: Jeromy

test(notifications)

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

License: MIT
Signed-off-by: 's avatarBrian Tiger Chow <brian@perfmode.com>
上级 9120d107
......@@ -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 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论