[Failing Test]: Four SpannerChangeStreamErrorTest tests are still disabled and fail on stale expectations
What happened?
Four tests in SpannerChangeStreamErrorTest (:sdks:java:io:google-cloud-platform) are still @Ignored on master (d44b8088865):
testUnavailableExceptionRetries(L119)testAbortedExceptionRetries(L160)testResourceExhaustedRetry(L224)testInvalidRecordReceived(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 @Ignores 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), so the mock's sticky error fails that query. The current client surfaces the injected status instead:
The other two fail the same way withExpected: 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')'"ABORTEDandRESOURCE_EXHAUSTED. The enabled siblingstestUnknownExceptionDoesNotRetryandtestResourceExhaustedRetryWithDefaultSettingsalready expect the injected status like this. testInvalidRecordReceivedfails withINTERNAL: ... There is no result registered for the statement: select option_value from information_schema.change_stream_options .... It lacks themockChangeStreamOptions(),mockGetPartitionSize(...)andmockChangePartitionState(...)setup that its enabled twintestInvalidRecordReceivedWithDefaultSettingshas.
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 @Ignores. 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.
.add-labels bug,'awaiting triage','failing test'
.take-issue