zhuzhurk commented on code in PR #21672:
URL: https://github.com/apache/flink/pull/21672#discussion_r1089864919
##########
flink-core/src/test/java/org/apache/flink/api/common/ExecutionConfigTest.java:
##########
@@ -44,13 +44,10 @@
import java.util.List;
import java.util.Random;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
public class ExecutionConfigTest extends TestLogger {
Review Comment:
```suggestion
class ExecutionConfigTest {
```
`public` is no longer needed for test classes in JUnit5.
It's also not needed for each `@Test`.
`TestLogger` has been reworked to be a Flink default test rule and is no
longer needed.
##########
flink-core/src/test/java/org/apache/flink/api/common/ExecutionConfigTest.java:
##########
@@ -297,7 +294,7 @@ private void testLoadingSchedulerTypeFromConfiguration(
configFromConfiguration.configure(
configuration, Thread.currentThread().getContextClassLoader());
- assertThat(configFromConfiguration.getSchedulerType().get(),
is(schedulerType));
Review Comment:
This hotfix should happen before all the changes. And that we do not change
something over and over.
##########
flink-core/src/test/java/org/apache/flink/api/common/ExecutionConfigTest.java:
##########
@@ -192,7 +189,7 @@ public void testReadingDefaultConfig() {
// mutate config according to configuration
executionConfig.configure(configuration,
ExecutionConfigTest.class.getClassLoader());
- assertThat(executionConfig, equalTo(new ExecutionConfig()));
+ assertEquals(executionConfig, new ExecutionConfig());
Review Comment:
According to Flink code style
(https://flink.apache.org/contributing/code-style-and-quality-common.html#tooling),
`assertThat` of `assertJ` is recommended.
##########
flink-core/src/test/java/org/apache/flink/api/common/ExecutionConfigTest.java:
##########
@@ -44,13 +44,10 @@
import java.util.List;
import java.util.Random;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
Review Comment:
`org.junit.jupiter.api.Test` should be used instead of `org.junit.Test`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]