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 69409e4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
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
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ dirty.dirty.db.table=inlong_iceberg::dirty_data_achive_iceberg
schedule.engine.dolphinscheduler.url=http://127.0.0.1:12345/dolphinscheduler
schedule.engine.dolphinscheduler.token=default_token_value


# Airflow configuration
schedule.engine.airflow.baseUrl=
schedule.engine.airflow.username=
Expand Down

0 comments on commit 69409e4

Please sign in to comment.