From 71abc9d6b7e60d1e67fdea4d8ebfb5c095c1118b Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 14 Feb 2024 18:58:19 +0000 Subject: [PATCH] fixup! Upgrade to Testcontainers 1.19.5 --- .../boot/image/assertions/ImageAssert.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/assertions/ImageAssert.java b/spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/assertions/ImageAssert.java index fc5f950941..ce326c1702 100644 --- a/spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/assertions/ImageAssert.java +++ b/spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/assertions/ImageAssert.java @@ -80,12 +80,12 @@ public class ImageAssert extends AbstractAssert { this.actual.writeTo(out); try (TarArchiveInputStream in = new TarArchiveInputStream( new ByteArrayInputStream(out.toByteArray()))) { - TarArchiveEntry entry = in.getNextEntry(); + TarArchiveEntry entry = in.getNextTarEntry(); while (entry != null) { if (!entry.isDirectory()) { entryNames.add(entry.getName().replaceFirst("^/workspace/", "")); } - entry = in.getNextEntry(); + entry = in.getNextTarEntry(); } } } @@ -101,7 +101,7 @@ public class ImageAssert extends AbstractAssert { this.actual.writeTo(out); try (TarArchiveInputStream in = new TarArchiveInputStream( new ByteArrayInputStream(out.toByteArray()))) { - TarArchiveEntry entry = in.getNextEntry(); + TarArchiveEntry entry = in.getNextTarEntry(); while (entry != null) { if (entry.getName().equals(name)) { ByteArrayOutputStream entryOut = new ByteArrayOutputStream(); @@ -109,7 +109,7 @@ public class ImageAssert extends AbstractAssert { assertConsumer.accept(new JsonContentAssert(LayerContentAssert.class, entryOut.toString())); return; } - entry = in.getNextEntry(); + entry = in.getNextTarEntry(); } } failWithMessage("Expected JSON entry '%s' in layer with digest '%s'", name, this.actual.getId());