Skip to content

Commit 9110671

Browse files
committed
Don't use common pool to start LazyNetwork
1 parent 5b620d3 commit 9110671

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 2.7.2
2+
* `LazyNetwork`: Use explicitly defined `ExecutorService`
3+
* Updated dependencies
4+
15
# 2.7.1
26
* Readd missing whitespace in `TCITracer`
37

base/src/main/java/software/xdev/tci/network/LazyNetwork.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
import com.github.dockerjava.api.DockerClient;
4141
import com.github.dockerjava.api.command.CreateNetworkCmd;
4242

43+
import software.xdev.tci.concurrent.TCIExecutorServiceHolder;
44+
4345

4446
/**
4547
* A better implementation of {@link Network} in relation to {@link org.testcontainers.containers.Network.NetworkImpl}.
@@ -88,7 +90,7 @@ public class LazyNetwork implements Network
8890

8991
public LazyNetwork create()
9092
{
91-
return this.create(CompletableFuture::runAsync);
93+
return this.create(r -> CompletableFuture.runAsync(r, TCIExecutorServiceHolder.instance()));
9294
}
9395

9496
public LazyNetwork create(final Function<Runnable, CompletableFuture<Void>> executor)

0 commit comments

Comments
 (0)