Skip to content

Commit

Permalink
[INLONG-11400][Manager] Fix UT
Browse files Browse the repository at this point in the history
  • Loading branch information
ZKpLo committed Nov 20, 2024
1 parent c640bbf commit 245fc3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -54,6 +55,11 @@ public static void initScheduleEngine() {
}
}

@AfterAll
public static void stopScheduleEngine() {
AirflowContainerEnv.shutDown();
}

@Test
@Order(1)
public void testRegisterScheduleInfo() {
Expand Down

0 comments on commit 245fc3a

Please sign in to comment.