ex172000 commented on code in PR #14093:
URL: https://github.com/apache/kafka/pull/14093#discussion_r1278454237
##########
connect/runtime/src/test/java/org/apache/kafka/connect/converters/BooleanConverterTest.java:
##########
@@ -74,10 +74,12 @@ public void testFromConnectNull() {
@Test
public void testToConnect() {
assertEquals(Schema.OPTIONAL_BOOLEAN_SCHEMA,
converter.toConnectData(TOPIC, TRUE).schema());
- assertEquals(Schema.OPTIONAL_BOOLEAN_SCHEMA,
converter.toConnectData(TOPIC, FALSE).schema());
- assertEquals(Schema.OPTIONAL_BOOLEAN_SCHEMA,
converter.toConnectData(TOPIC, null).schema());
assertTrue((Boolean) converter.toConnectData(TOPIC, TRUE).value());
+
+ assertEquals(Schema.OPTIONAL_BOOLEAN_SCHEMA,
converter.toConnectData(TOPIC, FALSE).schema());
Review Comment:
Oh sorry if I didn't make it clear. Looks like the previous commit the value
is also asserted via the `AssertEquals`, as well as the converter's output via
`assertTrue/false`, but then the value comparison was removed. Seems now it's
added back again. 👍
##########
connect/runtime/src/test/java/org/apache/kafka/connect/converters/BooleanConverterTest.java:
##########
@@ -74,10 +74,12 @@ public void testFromConnectNull() {
@Test
public void testToConnect() {
assertEquals(Schema.OPTIONAL_BOOLEAN_SCHEMA,
converter.toConnectData(TOPIC, TRUE).schema());
- assertEquals(Schema.OPTIONAL_BOOLEAN_SCHEMA,
converter.toConnectData(TOPIC, FALSE).schema());
- assertEquals(Schema.OPTIONAL_BOOLEAN_SCHEMA,
converter.toConnectData(TOPIC, null).schema());
assertTrue((Boolean) converter.toConnectData(TOPIC, TRUE).value());
+
+ assertEquals(Schema.OPTIONAL_BOOLEAN_SCHEMA,
converter.toConnectData(TOPIC, FALSE).schema());
Review Comment:
Oh sorry if I didn't make it clear. Looks like the previous commit the value
is also asserted via the `AssertEquals`, as well as the converter's output via
`assertTrue/false`, but then the value comparison was removed. Seems now it's
added back again. 👍
--
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]