Skip to content

Commit 4ed2f07

Browse files
build: skip InstanceAdmin test on cloud-devel to reduce flakiness (#3107)
* build: skip InstanceAdmin test on cloud-devel to reduce flakiness * 🦉 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 45cdcfc commit 4ed2f07

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.google.cloud.spanner;
1818

1919
import static com.google.common.base.Preconditions.checkState;
20+
import static org.junit.Assume.assumeFalse;
2021

2122
import com.google.api.client.util.ExponentialBackOff;
2223
import com.google.api.gax.longrunning.OperationFuture;
@@ -26,6 +27,7 @@
2627
import com.google.cloud.spanner.testing.RemoteSpannerHelper;
2728
import com.google.common.collect.Iterators;
2829
import com.google.spanner.admin.instance.v1.CreateInstanceMetadata;
30+
import java.util.Objects;
2931
import java.util.Random;
3032
import java.util.concurrent.ExecutionException;
3133
import java.util.concurrent.TimeUnit;
@@ -89,9 +91,17 @@ protected void initializeConfig()
8991
config = configClass.newInstance();
9092
}
9193

94+
boolean isCloudDevel() {
95+
return Objects.equals(
96+
System.getProperty("spanner.gce.config.server_url"),
97+
"https://staging-wrenchworks.sandbox.googleapis.com");
98+
}
99+
92100
@Override
93101
protected void before() throws Throwable {
94102
this.initializeConfig();
103+
assumeFalse(alwaysCreateNewInstance && isCloudDevel());
104+
95105
this.config.setUp();
96106

97107
SpannerOptions options = config.spannerOptions();

0 commit comments

Comments
 (0)