zhuzhurk commented on code in PR #21672:
URL: https://github.com/apache/flink/pull/21672#discussion_r1089876108
##########
flink-core/src/test/java/org/apache/flink/api/common/ExecutionConfigTest.java:
##########
@@ -67,37 +61,37 @@ public void testDoubleTypeRegistration() {
int counter = 0;
for (Class<?> tpe : config.getRegisteredKryoTypes()) {
- assertEquals(tpe, expectedTypes.get(counter++));
+ assertThat(tpe).isEqualTo(expectedTypes.get(counter++));
}
- assertEquals(expectedTypes.size(), counter);
+ assertThat(expectedTypes.size()).isEqualTo(counter);
}
@Test
- public void testConfigurationOfParallelism() {
+ void testConfigurationOfParallelism() {
ExecutionConfig config = new ExecutionConfig();
// verify explicit change in parallelism
int parallelism = 36;
config.setParallelism(parallelism);
- assertEquals(parallelism, config.getParallelism());
+ assertThat(parallelism).isEqualTo(config.getParallelism());
// verify that parallelism is reset to default flag value
parallelism = ExecutionConfig.PARALLELISM_DEFAULT;
config.setParallelism(parallelism);
- assertEquals(parallelism, config.getParallelism());
+ assertThat(parallelism).isEqualTo(config.getParallelism());
}
@Test
- public void testDisableGenericTypes() {
+ void testDisableGenericTypes() {
ExecutionConfig conf = new ExecutionConfig();
TypeInformation<Object> typeInfo = new
GenericTypeInfo<Object>(Object.class);
// by default, generic types are supported
TypeSerializer<Object> serializer = typeInfo.createSerializer(conf);
- assertTrue(serializer instanceof KryoSerializer);
+ assertThat(serializer instanceof KryoSerializer).isTrue();
// expect an exception when generic types are disabled
conf.disableGenericTypes();
Review Comment:
`assertThatThrownBy` should be used instead of `fail`. An example can be
`AllToAllBlockingResultInfoTest#testGetBytesWithPartialPartitionInfos()`.
--
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]