From e32925397b3110f6dd5e18c79f6641bd2a55776f Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 5 Aug 2016 13:24:48 +0200 Subject: rpc: add context argument to EthSubscribe It's inconsistent not to pass it and most callers will work with contexts anyway. --- rpc/client_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rpc/client_test.go') diff --git a/rpc/client_test.go b/rpc/client_test.go index 424d7f5bc..476c8c6f3 100644 --- a/rpc/client_test.go +++ b/rpc/client_test.go @@ -215,7 +215,7 @@ func TestClientSubscribeInvalidArg(t *testing.T) { t.Error(string(buf)) } }() - client.EthSubscribe(arg, "foo_bar") + client.EthSubscribe(context.Background(), arg, "foo_bar") } check(true, nil) check(true, 1) @@ -233,7 +233,7 @@ func TestClientSubscribe(t *testing.T) { nc := make(chan int) count := 10 - sub, err := client.EthSubscribe(nc, "someSubscription", count, 0) + sub, err := client.EthSubscribe(context.Background(), nc, "someSubscription", count, 0) if err != nil { t.Fatal("can't subscribe:", err) } @@ -275,7 +275,7 @@ func TestClientSubscribeClose(t *testing.T) { err error ) go func() { - sub, err = client.EthSubscribe(nc, "hangSubscription", 999) + sub, err = client.EthSubscribe(context.Background(), nc, "hangSubscription", 999) errc <- err }() @@ -311,7 +311,7 @@ func TestClientNotificationStorm(t *testing.T) { // Subscribe on the server. It will start sending many notifications // very quickly. nc := make(chan int) - sub, err := client.EthSubscribe(nc, "someSubscription", count, 0) + sub, err := client.EthSubscribe(ctx, nc, "someSubscription", count, 0) if err != nil { t.Fatal("can't subscribe:", err) } -- cgit