diff options
author | Felix Lange <fjl@twurst.com> | 2016-08-05 19:24:48 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-08-06 02:48:33 +0800 |
commit | e32925397b3110f6dd5e18c79f6641bd2a55776f (patch) | |
tree | 0ef2db220a7bb3cab4ff50f0c628ce7a997f7ac4 /rpc/client_test.go | |
parent | f5f042ffdc9fed3094b86f3dbbc85bb63a4f9537 (diff) | |
download | go-tangerine-e32925397b3110f6dd5e18c79f6641bd2a55776f.tar go-tangerine-e32925397b3110f6dd5e18c79f6641bd2a55776f.tar.gz go-tangerine-e32925397b3110f6dd5e18c79f6641bd2a55776f.tar.bz2 go-tangerine-e32925397b3110f6dd5e18c79f6641bd2a55776f.tar.lz go-tangerine-e32925397b3110f6dd5e18c79f6641bd2a55776f.tar.xz go-tangerine-e32925397b3110f6dd5e18c79f6641bd2a55776f.tar.zst go-tangerine-e32925397b3110f6dd5e18c79f6641bd2a55776f.zip |
rpc: add context argument to EthSubscribe
It's inconsistent not to pass it and most callers will
work with contexts anyway.
Diffstat (limited to 'rpc/client_test.go')
-rw-r--r-- | rpc/client_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
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) } |