This is an automated email from the ASF dual-hosted git repository. jiabaosun pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 6433aeb955a24fe0402d12bc170b4a9a58207e7e Author: Jiabao Sun <[email protected]> AuthorDate: Mon Mar 4 14:03:02 2024 +0800 [FLINK-25544][streaming][JUnit5 Migration] The environment package of module flink-stream-java --- .../environment/ExecutorDiscoveryAndJobClientTest.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/flink-streaming-java/src/test/java/org/apache/flink/streaming/environment/ExecutorDiscoveryAndJobClientTest.java b/flink-streaming-java/src/test/java/org/apache/flink/streaming/environment/ExecutorDiscoveryAndJobClientTest.java index d71ccd343db..9ed31a19d4e 100644 --- a/flink-streaming-java/src/test/java/org/apache/flink/streaming/environment/ExecutorDiscoveryAndJobClientTest.java +++ b/flink-streaming-java/src/test/java/org/apache/flink/streaming/environment/ExecutorDiscoveryAndJobClientTest.java @@ -27,13 +27,12 @@ import org.apache.flink.core.execution.PipelineExecutorFactory; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.functions.sink.v2.DiscardingSink; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.concurrent.CompletableFuture; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; +import static org.assertj.core.api.Assertions.assertThat; /** * Tests the {@link PipelineExecutorFactory} discovery in the {@link StreamExecutionEnvironment} and @@ -44,12 +43,12 @@ public class ExecutorDiscoveryAndJobClientTest { private static final String EXEC_NAME = "test-executor"; @Test - public void jobClientGetJobExecutionResultShouldBeCalledOnAttachedExecution() throws Exception { + void jobClientGetJobExecutionResultShouldBeCalledOnAttachedExecution() throws Exception { testHelper(true); } @Test - public void jobClientGetJobExecutionResultShouldBeCalledOnDetachedExecution() throws Exception { + void jobClientGetJobExecutionResultShouldBeCalledOnDetachedExecution() throws Exception { testHelper(false); } @@ -59,7 +58,7 @@ public class ExecutorDiscoveryAndJobClientTest { configuration.set(DeploymentOptions.ATTACHED, attached); final JobExecutionResult result = executeTestJobBasedOnConfig(configuration); - assertThat(result.isJobExecutionResult(), is(attached)); + assertThat(result.isJobExecutionResult()).isEqualTo(attached); } private JobExecutionResult executeTestJobBasedOnConfig(final Configuration configuration)
