|
|
@ -140,16 +140,20 @@ func testWS(t *testing.T, cl *client.WSClient) { |
|
|
|
t.Fatal(err) |
|
|
|
} |
|
|
|
|
|
|
|
msg := <-cl.ResultsCh |
|
|
|
result := new(Result) |
|
|
|
wire.ReadJSONPtr(result, msg, &err) |
|
|
|
if err != nil { |
|
|
|
select { |
|
|
|
case msg := <-cl.ResultsCh: |
|
|
|
result := new(Result) |
|
|
|
wire.ReadJSONPtr(result, msg, &err) |
|
|
|
if err != nil { |
|
|
|
t.Fatal(err) |
|
|
|
} |
|
|
|
got := (*result).(*ResultStatus).Value |
|
|
|
if got != val { |
|
|
|
t.Fatalf("Got: %v .... Expected: %v \n", got, val) |
|
|
|
} |
|
|
|
case err := <-cl.ErrorsCh: |
|
|
|
t.Fatal(err) |
|
|
|
} |
|
|
|
got := (*result).(*ResultStatus).Value |
|
|
|
if got != val { |
|
|
|
t.Fatalf("Got: %v .... Expected: %v \n", got, val) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//-------------
|
|
|
|