jonathansudhakar1 commented on issue #21240:
URL: https://github.com/apache/beam/issues/21240#issuecomment-6898079486

   This looks resolved on current master. #40259 (merged 2026-09-25) moved the 
database setup in both `SpannerReadIT` and `SpannerWriteIT` from per-test 
`@Before`/`@After` methods to `@BeforeClass`/`@AfterClass`. Each class now 
creates its GoogleSQL and PostgreSQL databases once and drops them after its 
last test:
   
   - `SpannerReadIT`: 
[`setUpTestEnvironment`](https://github.com/apache/beam/blob/b791929763c12f6080a92e0ec06c04158f6e25e3/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/SpannerReadIT.java#L106-L169)
 and 
[`tearDown`](https://github.com/apache/beam/blob/b791929763c12f6080a92e0ec06c04158f6e25e3/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/SpannerReadIT.java#L508-L517).
   - `SpannerWriteIT`: 
[`setUpTestEnvironment`](https://github.com/apache/beam/blob/b791929763c12f6080a92e0ec06c04158f6e25e3/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/SpannerWriteIT.java#L121-L183)
 and 
[`tearDown`](https://github.com/apache/beam/blob/b791929763c12f6080a92e0ec06c04158f6e25e3/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/SpannerWriteIT.java#L444-L453).
 Its remaining per-test 
[`@Before`](https://github.com/apache/beam/blob/b791929763c12f6080a92e0ec06c04158f6e25e3/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/SpannerWriteIT.java#L185-L194)
 only deletes all rows from the two tables.
   
   So the 16 tests in the two classes now share 4 databases per run, rather 
than each test creating its own. I checked this by reading the code at 
b791929763c; I didn't run the ITs, since they need a Spanner instance. If that 
matches your understanding, this issue can probably be closed.
   


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

Reply via email to