diff --git a/inlong-manager/manager-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowContainerEnv.java b/inlong-manager/manager-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowContainerEnv.java index 2e7d467581..f99282a2ed 100644 --- a/inlong-manager/manager-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowContainerEnv.java +++ b/inlong-manager/manager-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowContainerEnv.java @@ -69,6 +69,12 @@ public static void setUp() { log.info("Airflow runtime environment created successfully."); } + public static void shutDown() { + if (environment != null) { + environment.stop(); + } + } + private static void copyTestDAGs() { // After the DAG file is created, the scheduler will regularly scan the DAG file directory and // then load it into memory for scheduling. In order to quickly test the update and unregister, two diff --git a/inlong-manager/manager-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngineTest.java b/inlong-manager/manager-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngineTest.java index 2e4213f56f..fe5d070afd 100644 --- a/inlong-manager/manager-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngineTest.java +++ b/inlong-manager/manager-schedule/src/test/java/org/apache/inlong/manager/schedule/airflow/AirflowScheduleEngineTest.java @@ -21,6 +21,7 @@ import org.apache.inlong.manager.schedule.BaseScheduleTest; import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; @@ -54,6 +55,11 @@ public static void initScheduleEngine() { } } + @AfterAll + public static void stopScheduleEngine() { + AirflowContainerEnv.shutDown(); + } + @Test @Order(1) public void testRegisterScheduleInfo() {