firestore: remove test for codes.Canceled with RPC
The test is flaky and it isn't clear why. There is some nondeterminism that I can't figure out.
@@ -321,23 +321,6 @@ func TestWatchCancel(t *testing.T) {
_, _, _, err = ws.nextSnapshot()
codeEq(t, "cancel from gax.Sleep", codes.Canceled, err)
- // Cancel from an RPC.
- ctx2, cancel = context.WithCancel(ctx)
- ws, err = newWatchStreamForQuery(ctx2, q)
- if err != nil {
- t.Fatal(err)
- }
- srv.addRPC(request, []interface{}{current, noChange,
- &pb.ListenResponse{ResponseType: &pb.ListenResponse_DocumentChange{&pb.DocumentChange{
- Document: nil,
- TargetIds: []int32{watchTargetID},
- }}},
- })
- // Call nextSnapshot once to open the stream.
- _, _, _, _ = ws.nextSnapshot()
- cancel()
- // This call to nextSnapshot will call Recv on the stream with a canceled context,
- // so the error will come from gRPC.
- _, _, _, err = ws.nextSnapshot()
- codeEq(t, "cancel from Recv", codes.Canceled, err)
+ // TODO(jba): Test that we get codes.Canceled when canceling an RPC.
+ // We had a test for this in a21236af, but it was flaky for unclear reasons.
}
