snuyanzin commented on code in PR #106:
URL:
https://github.com/apache/flink-connector-kafka/pull/106#discussion_r1650413510
##########
flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/sink/KafkaWriterITCase.java:
##########
@@ -401,16 +401,16 @@ void usePoolForTransactional() throws Exception {
writer.snapshotState(1);
assertThat(committables0).hasSize(1);
final KafkaCommittable committable =
committables0.stream().findFirst().get();
- assertThat(committable.getProducer().isPresent()).isTrue();
+ assertThat(committable.getProducer()).isPresent();
FlinkKafkaInternalProducer<?, ?> firstProducer =
committable.getProducer().get().getObject();
assertThat(firstProducer != writer.getCurrentProducer())
.as("Expected different producer")
- .isTrue();
+ .isNotSameAs(writer.getCurrentProducer());
Review Comment:
seems like a wrong statement which always will pass the test since
`firstProducer != writer.getCurrentProducer()` is always is not same as
`writer.getCurrentProducer()`
I guess the correct one should be
```java
assertThat(firstProducer)
.as("Expected different producer")
.isNotSameAs(writer.getCurrentProducer());
```
--
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]