jonathansudhakar1 opened a new issue, #41481: URL: https://github.com/apache/beam/issues/41481
### What happened? Four tests in `SpannerChangeStreamErrorTest` (`:sdks:java:io:google-cloud-platform`) are still `@Ignore`d on master (d44b8088865): - `testUnavailableExceptionRetries` ([L119](https://github.com/apache/beam/blob/d44b8088865011b78a61d419c688c97862ce1914/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/SpannerChangeStreamErrorTest.java#L119)) - `testAbortedExceptionRetries` ([L160](https://github.com/apache/beam/blob/d44b8088865011b78a61d419c688c97862ce1914/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/SpannerChangeStreamErrorTest.java#L160)) - `testResourceExhaustedRetry` ([L224](https://github.com/apache/beam/blob/d44b8088865011b78a61d419c688c97862ce1914/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/SpannerChangeStreamErrorTest.java#L224)) - `testInvalidRecordReceived` ([L288](https://github.com/apache/beam/blob/d44b8088865011b78a61d419c688c97862ce1914/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/SpannerChangeStreamErrorTest.java#L288)) #37003 disabled them in December 2025 to unblock the Spanner client upgrade in #36995, and #37002 tracked re-enabling them. The stale bot closed #37002 as not planned on 2026-07-06 without a fix; its assignee's last update there was in January. #21533 (2022) is an older issue about `testUnavailableExceptionRetries` that #28751 fixed in 2023; it's still open, but it predates this breakage. So nothing open tracks these four tests now, which is why I'm filing a new issue rather than commenting on a closed one. With the `@Ignore`s removed on d44b8088865, all four fail: ``` ./gradlew :sdks:java:io:google-cloud-platform:test --tests 'org.apache.beam.sdk.io.gcp.spanner.changestreams.SpannerChangeStreamErrorTest' 7 tests completed, 4 failed ``` They fail on stale test expectations, not on a connector bug: - **The three retry tests** expect `DEADLINE_EXCEEDED`. `readChangeStream().expand()` reads the database dialect while the pipeline is constructed ([SpannerIO.java#L2404-L2405](https://github.com/apache/beam/blob/d44b8088865011b78a61d419c688c97862ce1914/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java#L2404-L2405)), so the mock's sticky error fails that query. The current client surfaces the injected status instead: ``` Expected: exception with message a string containing "DEADLINE_EXCEEDED" but: message was "UNAVAILABLE: io.grpc.StatusRuntimeException: UNAVAILABLE - Statement: 'select option_name, option_value from information_schema.database_options where option_name in ('database_dialect', 'default_transaction_isolation')'" ``` The other two fail the same way with `ABORTED` and `RESOURCE_EXHAUSTED`. The enabled siblings `testUnknownExceptionDoesNotRetry` and `testResourceExhaustedRetryWithDefaultSettings` already expect the injected status like this. - **`testInvalidRecordReceived`** fails with `INTERNAL: ... There is no result registered for the statement: select option_value from information_schema.change_stream_options ...`. It lacks the `mockChangeStreamOptions()`, `mockGetPartitionSize(...)` and `mockChangePartitionState(...)` setup that its enabled twin `testInvalidRecordReceivedWithDefaultSettings` has. Proposed fix (test-only): expect the injected status as a `SpannerException` in the three retry tests; give `testInvalidRecordReceived` its twin's mocks and expectations (`PipelineExecutionException` with "Field not found"); and remove the `@Ignore`s. With that change the class passes locally: 7 of 7 tests in each of 6 consecutive runs (the last five with `--rerun`). ### Issue Failure Failure: Test is continually failing ### Issue Priority Priority: 2 (backlog / disabled test but we think the product is healthy) ### Issue Components - [ ] Component: Python SDK - [x] Component: Java SDK - [ ] Component: Go SDK - [ ] Component: Typescript SDK - [x] Component: IO connector - [ ] Component: Beam YAML - [ ] Component: Beam examples - [ ] Component: Beam playground - [ ] Component: Beam katas - [ ] Component: Website - [ ] Component: Infrastructure - [ ] Component: Spark Runner - [ ] Component: Flink Runner - [ ] Component: Prism Runner - [ ] Component: Hazelcast Jet Runner - [ ] Component: Google Cloud Dataflow Runner I'm planning to submit a fix. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
