Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in test: callback not properly intercepted #804

Merged
merged 2 commits into from
Apr 30, 2020

Conversation

stanley-cheung
Copy link
Collaborator

Fix #661

The bug is that, in the test, we tried to intercept the goog.events.listen() call from the library code, to store away the 3rd argument, which is a callback when a certain XHR event is emitted. Once we have that callback stored away, we can call it at a right time in the test to simulate some new data coming in from the wire.

The problem is that, in the GrpcWebClientReadableStream constructor, there are two calls to goog.events.listen(). One for READY_STATE_CHANGE and one for COMPLETE. We want to intercept the first one but not the 2nd one.

@stanley-cheung stanley-cheung merged commit 5c1b6c7 into grpc:master Apr 30, 2020
@stanley-cheung stanley-cheung deleted the fix-test-bug branch April 30, 2020 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gRPC web client base test does not work expectedly
1 participant