Rishavbhattarai opened a new pull request, #41138:
URL: https://github.com/apache/beam/pull/41138

   Fixes #18694.
   
   Ports `ReadSpannerSchemaTest` off the deprecated `DoFnTester`. Both tests 
(`simple` and `pgSimple`) used it.
   
   Nothing here blocks `TestPipeline`: `FakeServiceFactory` keeps its mocks in 
static lists and is serializable, which is how the other Spanner tests already 
run pipelines with it. So both tests now run `ReadSpannerSchema` through the 
class's existing `pipeline`, wired the way `SpannerIO` does it:
   
   - a `Create.of((Void) null)` seed
   - the dialect as a real side input (`View.asSingleton()`) instead of 
`setSideInput`
   - the existing checks moved unchanged into one `PAssert.satisfies` helper, 
shared by both tests since they expect the same schema
   
   The two `Create`s got names to keep transform names stable. Before, each 
test ran an empty pipeline and then called the `DoFnTester` by hand. Now 
`pipeline.run()` comes after the `PAssert`.
   
   Testing: `./gradlew :sdks:java:io:google-cloud-platform:test --tests 
'org.apache.beam.sdk.io.gcp.spanner.*'` passes (473 run, 4 skipped, 0 
failures), and `spotlessCheck` is clean. To make sure the `PAssert` actually 
runs, I changed the expected column type from `INT64` to `STRING` and both 
tests failed.
   


-- 
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]

  • [PR] Port ReadSpannerSchemaTes... Rishavbhattarai (via GitHub) via github

Reply via email to