From b392e3c58edf6dcc3e6a8535a94a0808f3cfc6f7 Mon Sep 17 00:00:00 2001 From: Reed von Redwitz Date: Sun, 19 Apr 2026 13:41:56 +0200 Subject: [PATCH 1/2] chore: uptake latest base and codemodel --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f4d9f5c..f140823 100644 --- a/pom.xml +++ b/pom.xml @@ -68,9 +68,9 @@ 3.27.7 - 0.22.1 + 0.23.0 1.18.4 - 0.20.1 + 0.21.0 2.21.2 6.0.3 2.0.1 From a4a524d2e641c217d5dcbc9683c445c17ea23c85 Mon Sep 17 00:00:00 2001 From: Reed von Redwitz Date: Sun, 19 Apr 2026 14:13:04 +0200 Subject: [PATCH 2/2] fix flaky test --- .../build/spawn/docker/jdk/SessionTests.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/spawn-docker-jdk/src/test/java/build/spawn/docker/jdk/SessionTests.java b/spawn-docker-jdk/src/test/java/build/spawn/docker/jdk/SessionTests.java index 31295e4..46aab41 100644 --- a/spawn-docker-jdk/src/test/java/build/spawn/docker/jdk/SessionTests.java +++ b/spawn-docker-jdk/src/test/java/build/spawn/docker/jdk/SessionTests.java @@ -636,10 +636,10 @@ void shouldCopyAFileToAContainer() try (var session = createSession()) { final var image = session.images() - .get(RABBITMQ_IMAGE) + .get(ALPINE_IMAGE) .orElseThrow(() -> new AssertionError("Failed to get the required image")); - try (var container = image.start()) { + try (var container = image.start(Command.of("sleep", "60"))) { Eventually.assertThat(container.onStart()) .isCompleted(); @@ -650,13 +650,19 @@ void shouldCopyAFileToAContainer() assertThat(container.id()) .isNotNull(); - // create a /tmp/test folder in the container - Eventually.assertThat(container - .createExecutable("mkdir", "/tmp/test") - .execute() - .onExit()) + // create a /tmp/test folder in the container; withTerminal(true) ensures Detach:false so + // onExit() tracks actual process completion rather than just exec launch + final var mkdirExecution = container + .createExecutable("mkdir", "/tmp/test") + .withTerminal(true) + .execute(); + + Eventually.assertThat(mkdirExecution.onExit()) .isCompleted(); + assertThat(mkdirExecution.exitValue().getAsInt()) + .isEqualTo(0); + // establish a temporary folder and a temporary file in the folder, tar the folder and send it to the // Create temp dir and a file inside it