From 9bc6bda306b347d47b7b7a5d44b4e56db5f81798 Mon Sep 17 00:00:00 2001 From: Chris Bono Date: Mon, 18 Mar 2024 00:17:03 -0500 Subject: [PATCH] Fix CI failures caused by previous commit (#616) The previous commit annotated `PulsarTestContainerSupport#stopContainer` with `@ AfterAll`. This had unintended side effects when used in nested Jupiter tests. This commit removes the annotation from the stop method. --- .../pulsar/test/support/PulsarTestContainerSupport.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spring-pulsar-test/src/main/java/org/springframework/pulsar/test/support/PulsarTestContainerSupport.java b/spring-pulsar-test/src/main/java/org/springframework/pulsar/test/support/PulsarTestContainerSupport.java index 7fa9fbdd..a996bf1e 100644 --- a/spring-pulsar-test/src/main/java/org/springframework/pulsar/test/support/PulsarTestContainerSupport.java +++ b/spring-pulsar-test/src/main/java/org/springframework/pulsar/test/support/PulsarTestContainerSupport.java @@ -16,7 +16,6 @@ package org.springframework.pulsar.test.support; -import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.testcontainers.containers.PulsarContainer; import org.testcontainers.junit.jupiter.Testcontainers; @@ -42,8 +41,7 @@ public interface PulsarTestContainerSupport { PULSAR_CONTAINER.start(); } - @AfterAll - static void stopContainer() { + static void stopContainer2() { PULSAR_CONTAINER.stop(); }