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

test: ignore if the mock server failed to return a row #3335

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Conversation

olavloite
Copy link
Collaborator

@olavloite olavloite commented Sep 16, 2024

The test uses a trick in the mock server, where the mock server is requested to freeze after returning the first row. However, when the mock server adds the first row to the stream, it is not guaranteed to be readable for the client, which again causes the test to hang on the ResultSet#next() call. The gRPC libraries then execute keep-alive requests to keep the TCP connection alive while waiting for data from the mock server, which will never come. This caused the query to eventually fail with a RESOURCE_EXHAUSTED error.

The tests work around this issue by just ignoring the case when the mock server fails to return the first row, as it is something that only very sporadically happens.

Fixes #3328

The test uses a trick in the mock server, where the mock server is
requested to freeze after returning the first row. However, when the
mock server adds the first row to the stream, it is not guaranteed to be
readable for the client, which again causes the test to hang on the
ResultSet#next() call. The gRPC libraries then execute keep-alive
requests to keep the TCP connection alive while waiting for data from
the mock server, which will never come. This caused the query to
eventually fail with a RESOURCE_EXHAUSTED error.

The tests work around this issue by just ignoring the case when the mock
server fails to return the first row, as it is something that only very
sporadically happens.
@olavloite olavloite requested a review from a team as a code owner September 16, 2024 13:16
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner API. labels Sep 16, 2024
@rahul2393 rahul2393 merged commit b5a4ebd into main Sep 17, 2024
33 checks passed
@rahul2393 rahul2393 deleted the issue-3328 branch September 17, 2024 12:59
rahul2393 pushed a commit that referenced this pull request Sep 19, 2024
The test uses a trick in the mock server, where the mock server is
requested to freeze after returning the first row. However, when the
mock server adds the first row to the stream, it is not guaranteed to be
readable for the client, which again causes the test to hang on the
ResultSet#next() call. The gRPC libraries then execute keep-alive
requests to keep the TCP connection alive while waiting for data from
the mock server, which will never come. This caused the query to
eventually fail with a RESOURCE_EXHAUSTED error.

The tests work around this issue by just ignoring the case when the mock
server fails to return the first row, as it is something that only very
sporadically happens.
lqiu96 pushed a commit that referenced this pull request Sep 19, 2024
The test uses a trick in the mock server, where the mock server is
requested to freeze after returning the first row. However, when the
mock server adds the first row to the stream, it is not guaranteed to be
readable for the client, which again causes the test to hang on the
ResultSet#next() call. The gRPC libraries then execute keep-alive
requests to keep the TCP connection alive while waiting for data from
the mock server, which will never come. This caused the query to
eventually fail with a RESOURCE_EXHAUSTED error.

The tests work around this issue by just ignoring the case when the mock
server fails to return the first row, as it is something that only very
sporadically happens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CloseSpannerWithOpenResultSetTest is flaky
2 participants