From e0c75823b7f34c58e2ded5da99a0663bede0f0ab Mon Sep 17 00:00:00 2001 From: Zakelly Date: Tue, 3 Dec 2024 22:03:20 +0800 Subject: [PATCH] [hotfix] Use `FlinkEnv` in tests for ForStStateBackend --- ...tStateBackendTestV2.java => ForStStateBackendV2Test.java} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/{ForStStateBackendTestV2.java => ForStStateBackendV2Test.java} (95%) diff --git a/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendTestV2.java b/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendV2Test.java similarity index 95% rename from flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendTestV2.java rename to flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendV2Test.java index 413f81532ff89..ff77675d05bf0 100644 --- a/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendTestV2.java +++ b/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendV2Test.java @@ -43,7 +43,7 @@ /** Tests for the async keyed state backend part of {@link ForStStateBackend}. */ @ExtendWith(ParameterizedTestExtension.class) -class ForStStateBackendTestV2 extends StateBackendTestV2Base { +class ForStStateBackendV2Test extends StateBackendTestV2Base { @TempDir private static java.nio.file.Path tempFolder; @TempDir private static java.nio.file.Path tempFolderForForStLocal; @@ -94,7 +94,6 @@ protected ConfigurableStateBackend getStateBackend() throws Exception { if (hasRemoteDir) { config.set(REMOTE_DIRECTORY, tempFolderForForstRemote.toString()); } - backend.configure(config, Thread.currentThread().getContextClassLoader()); - return new ForStStateBackend(); + return backend.configure(config, Thread.currentThread().getContextClassLoader()); } }