test(notifications)

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

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
Brian Tiger Chow 2014-11-21 15:25:37 -08:00 committed by Jeromy
parent 9120d107c3
commit d5e7fd6707

View File

@ -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