This is an automated email from the ASF dual-hosted git repository.
wenjun pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 7e9df4b14d [Chore] Fix StopWorkflowInstanceExecuteFunctionTest failed
on Locale.SIMPLIFIED_CHINESE (#16893)
7e9df4b14d is described below
commit 7e9df4b14d618c8bf5ed122941dc86885f717660
Author: Wenjun Ruan <[email protected]>
AuthorDate: Mon Dec 16 13:46:15 2024 +0800
[Chore] Fix StopWorkflowInstanceExecuteFunctionTest failed on
Locale.SIMPLIFIED_CHINESE (#16893)
---
.../workflow/StopWorkflowInstanceExecuteFunctionTest.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git
a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/executor/workflow/StopWorkflowInstanceExecuteFunctionTest.java
b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/executor/workflow/StopWorkflowInstanceExecuteFunctionTest.java
index 9c6fa6ac5e..60e11477a0 100644
---
a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/executor/workflow/StopWorkflowInstanceExecuteFunctionTest.java
+++
b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/executor/workflow/StopWorkflowInstanceExecuteFunctionTest.java
@@ -25,7 +25,11 @@ import
org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
import org.apache.dolphinscheduler.dao.repository.WorkflowInstanceDao;
+import java.util.Locale;
+
+import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
@@ -34,6 +38,7 @@ import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockito.junit.jupiter.MockitoSettings;
import org.mockito.quality.Strictness;
+import org.springframework.context.i18n.LocaleContextHolder;
@ExtendWith(MockitoExtension.class)
@MockitoSettings(strictness = Strictness.LENIENT)
@@ -45,6 +50,16 @@ class StopWorkflowInstanceExecuteFunctionTest {
@InjectMocks
private StopWorkflowInstanceExecutorDelegate
stopWorkflowInstanceExecutorDelegate;
+ @BeforeAll
+ public static void setUp() {
+ LocaleContextHolder.setLocale(Locale.US);
+ }
+
+ @AfterAll
+ public static void tearDown() {
+ LocaleContextHolder.resetLocaleContext();
+ }
+
@ParameterizedTest
@EnumSource(value = WorkflowExecutionStatus.class, names = {
"RUNNING_EXECUTION",