Skip to content

Commit

Permalink
docs: close Spanner instance when it is no longer needed (#1116)
Browse files Browse the repository at this point in the history
The CreateInstance example opened a Spanner instance without closing it.
That was spamming the test logs with a lot of warnings.
  • Loading branch information
olavloite committed May 3, 2021
1 parent 47f5965 commit 85bd0cf
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -65,6 +65,8 @@ static void createInstance(String projectId, String instanceId) {
instanceInfo.getId(), e.getMessage());
} catch (InterruptedException e) {
System.out.println("Error: Waiting for createInstance operation to finish was interrupted");
} finally {
spanner.close();
}
}
}
Expand Down

0 comments on commit 85bd0cf

Please sign in to comment.