Skip to content

Commit 6382ed3

Browse files
fix flink procedure test case
1 parent 399b146 commit 6382ed3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/procedure/FlinkProcedureITCase.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.apache.flink.types.Row;
3030
import org.apache.flink.util.CloseableIterator;
3131
import org.apache.flink.util.CollectionUtil;
32+
import org.junit.jupiter.api.AfterEach;
3233
import org.junit.jupiter.api.BeforeEach;
3334
import org.junit.jupiter.api.Test;
3435
import org.junit.jupiter.api.extension.RegisterExtension;
@@ -86,6 +87,31 @@ void before() throws ExecutionException, InterruptedException {
8687
tEnv.executeSql("use catalog " + CATALOG_NAME);
8788
}
8889

90+
@AfterEach
91+
void after() throws Exception {
92+
// Clean up any dynamic config changes made during the test
93+
// to ensure tests don't affect each other
94+
if (tEnv != null) {
95+
try {
96+
// Delete dynamic configs that might have been modified during tests
97+
// This resets them to their initial static configuration values
98+
tEnv.executeSql(
99+
String.format(
100+
"Call %s.sys.set_cluster_config('%s')",
101+
CATALOG_NAME,
102+
ConfigOptions.KV_SHARED_RATE_LIMITER_BYTES_PER_SEC.key()))
103+
.await();
104+
tEnv.executeSql(
105+
String.format(
106+
"Call %s.sys.set_cluster_config('%s')",
107+
CATALOG_NAME, ConfigOptions.DATALAKE_FORMAT.key()))
108+
.await();
109+
} catch (Exception e) {
110+
// Ignore cleanup errors to avoid masking test failures
111+
}
112+
}
113+
}
114+
89115
@Test
90116
void testShowProcedures() throws Exception {
91117
try (CloseableIterator<Row> showProceduresIterator =

0 commit comments

Comments
 (0)