You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "reswqa (via GitHub)" <gi...@apache.org> on 2023/02/16 13:43:30 UTC
[GitHub] [flink-connector-pulsar] reswqa commented on a diff in pull request #32: [FLINK-31101][Test] Drop the use of JUnit 5 assertions and mockito.
reswqa commented on code in PR #32:
URL: https://github.com/apache/flink-connector-pulsar/pull/32#discussion_r1108491837
##########
flink-connector-pulsar/src/test/java/org/apache/flink/connector/pulsar/common/config/PulsarConfigBuilderTest.java:
##########
@@ -65,12 +68,14 @@ void setPropertiesCanNotOverrideExistedKeysWithNewValueAndSupportTypeConversion(
Properties properties = new Properties();
properties.put("int.type", "6");
- assertDoesNotThrow(() -> builder.set(properties));
+
+ assertThatCode(() -> builder.set(properties)).doesNotThrowAnyException();
properties.put("int.type", "1");
- assertThrows(IllegalArgumentException.class, () -> builder.set(properties));
+ assertThatThrownBy(() -> builder.set(properties))
+ .isInstanceOf(IllegalArgumentException.class);
Integer value = builder.get(option);
- assertEquals(value, 6);
+ assertThat(builder.get(option)).isEqualTo(6);
Review Comment:
```suggestion
assertThat(value).isEqualTo(6);
```
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org