Skip to content

Commit e1b0cbb

Browse files
author
Shrenuj Bansal
committed
Change test to use http connection instead of ws
1 parent dc3fd8e commit e1b0cbb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (e *ErrClient) Error() string {
6060
}
6161

6262
// Unwrap unwraps the actual error
63-
func (e *ErrClient) Unwrap(err error) error {
63+
func (e *ErrClient) Unwrap() error {
6464
return e.err
6565
}
6666

rpc_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,13 @@ func TestRPCBadConnection(t *testing.T) {
150150
StringMatch func(t TestType, i2 int64) (out TestOut, err error)
151151
ErrChanSub func(context.Context) (<-chan int, error)
152152
}
153-
_, err := NewClient(context.Background(), "ws://"+testServ.Listener.Addr().String()+"0", "SimpleServerHandler", &client, nil)
153+
closer, err := NewClient(context.Background(), "http://"+testServ.Listener.Addr().String()+"0", "SimpleServerHandler", &client, nil)
154+
require.NoError(t, err)
155+
err = client.Add(2)
154156
require.True(t, errors.As(err, new(*RPCConnectionError)))
155157

158+
defer closer()
159+
156160
}
157161

158162
func TestRPC(t *testing.T) {

0 commit comments

Comments
 (0)