Skip to content

Commit 1c1656e

Browse files
test: fix timeDiff to drop old databases before running integration tests (#1874)
timeDiff should be equal to currentTimestamp.getSeconds() - db.getCreateTime().getSeconds(), so as to obtain a non-negative timeDiff value to compare. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent efcb961 commit 1c1656e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-spanner'
5656
If you are using Gradle without BOM, add this to your dependencies
5757

5858
```Groovy
59-
implementation 'com.google.cloud:google-cloud-spanner:6.23.3'
59+
implementation 'com.google.cloud:google-cloud-spanner:6.24.0'
6060
```
6161

6262
If you are using SBT, add this to your dependencies
6363

6464
```Scala
65-
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.23.3"
65+
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.24.0"
6666
```
6767

6868
## Authentication

google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestEnv.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private void cleanUpOldDatabases(InstanceId instanceId) {
180180
while (page != null) {
181181
for (Database db : page.iterateAll()) {
182182
try {
183-
long timeDiff = db.getCreateTime().getSeconds() - currentTimestamp.getSeconds();
183+
long timeDiff = currentTimestamp.getSeconds() - db.getCreateTime().getSeconds();
184184
// Delete all databases which are more than OLD_DB_THRESHOLD_SECS seconds
185185
// old.
186186
if ((db.getId().getDatabase().matches(TEST_DB_REGEX))

0 commit comments

Comments
 (0)