Skip to content

Commit 85da0bf

Browse files
authored
fix: close Spanner instance after tests (GoogleCloudPlatform#3853)
Close the `Spanner` instance after all tests have been executed. This ensures that all sessions that have been opened by the tests will be deleted on the backend.
1 parent b0b28d6 commit 85da0bf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spanner/cloud-client/src/test/java/com/example/spanner/SpannerSampleIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public static void tearDown() throws Exception {
7979
dbClient.dropDatabase(dbId.getInstanceId().getInstance(), dbId.getDatabase());
8080
dbClient.dropDatabase(
8181
dbId.getInstanceId().getInstance(), SpannerSample.createRestoredSampleDbId(dbId));
82+
spanner.close();
8283
}
8384

8485
@Test

0 commit comments

Comments
 (0)