fix flaky test where code can be 'cancelled' unexpectedly, instead of some error code provided by the server (#83)

This commit is contained in:
Joshua Humphries
2019-02-27 20:28:43 -05:00
committed by GitHub
parent ce84976d3c
commit d641a66208

View File

@@ -311,6 +311,7 @@ func invokeBidi(ctx context.Context, stub grpcdynamic.Stub, md *desc.MethodDescr
}
if err != nil {
err = fmt.Errorf("error getting request data: %v", err)
cancel()
break
}
@@ -321,7 +322,6 @@ func invokeBidi(ctx context.Context, stub grpcdynamic.Stub, md *desc.MethodDescr
if err != nil {
sendErr.Store(err)
cancel()
}
}()
}