Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public final class TestBench implements ManagedLifecycle {
private Path outPath;
private Path errPath;

private boolean runningOutsideAlready;

private TestBench(
boolean ignorePullError,
String baseUri,
Expand Down Expand Up @@ -199,6 +201,14 @@ public Object get() {

@Override
public void start() {
try {
listRetryTests();
LOGGER.info("Using testbench running outside test suite.");
runningOutsideAlready = true;
return;
} catch (IOException ignore) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more specific exception might be preferable, but it's probably fine

// expected when the server isn't running already
}
try {
tempDirectory = Files.createTempDirectory(containerName);
outPath = tempDirectory.resolve("stdout");
Expand Down Expand Up @@ -308,6 +318,10 @@ public boolean shouldRetry(

@Override
public void stop() {
if (runningOutsideAlready) {
// if the server was running outside the tests already simply return
return;
}
try {
process.destroy();
process.waitFor(2, TimeUnit.SECONDS);
Expand Down
1 change: 1 addition & 0 deletions google-cloud-storage/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<logger name="com.google.cloud.storage" level="info"/>
<logger name="com.google.cloud.storage.it" level="warn"/>
<logger name="com.google.cloud.storage.it.runner.registry.Zone" level="info"/>
<logger name="com.google.cloud.storage.it.runner.registry.TestBench" level="info"/>

<root level="info">
<appender-ref ref="STDOUT"/>
Expand Down