Skip to content

Commit

Permalink
keep a clean pull request related to jackson upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
bmscomp committed Dec 6, 2023
1 parent 6ad60f2 commit 6f0c3db
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public void nullToConnect() {
*/
@Test
public void emptyBytesToConnect() {
// This characterizes the messages with empty data when Json schemas are disabled
// This characterizes the messages with empty data when Json schemas is disabled
Map<String, Boolean> props = Collections.singletonMap("schemas.enable", false);
converter.configure(props, true);
SchemaAndValue converted = converter.toConnectData(TOPIC, "".getBytes());
Expand All @@ -220,7 +220,7 @@ public void emptyBytesToConnect() {
*/
@Test
public void schemalessWithEmptyFieldValueToConnect() {
// This characterizes the messages with empty data when Json schemas are disabled
// This characterizes the messages with empty data when Json schemas is disabled
Map<String, Boolean> props = Collections.singletonMap("schemas.enable", false);
converter.configure(props, true);
String input = "{ \"a\": \"\", \"b\": null}";
Expand Down Expand Up @@ -502,7 +502,7 @@ public void testCacheSchemaToConnectConversion() {
converter.toConnectData(TOPIC, "{ \"schema\": { \"type\": \"boolean\", \"optional\": true }, \"payload\": true }".getBytes());
assertEquals(2, converter.sizeOfToConnectSchemaCache());

// Even equivalent, but different JSON encoding of schema should get different cache entry
// Even equivalent, but different JSON encoding of schema, should get different cache entry
converter.toConnectData(TOPIC, "{ \"schema\": { \"type\": \"boolean\", \"optional\": false }, \"payload\": true }".getBytes());
assertEquals(3, converter.sizeOfToConnectSchemaCache());
}
Expand Down Expand Up @@ -788,7 +788,7 @@ public void nullSchemaAndMapToJson() {

@Test
public void nullSchemaAndMapNonStringKeysToJson() {
// This still needs to do conversion of data; null schema means "anything goes". Make sure we mix and match
// This still needs to do conversion of data null schema means "anything goes". Make sure we mix and match
// types to verify conversion still works.
Map<Object, Object> input = new HashMap<>();
input.put("string", 12);
Expand Down Expand Up @@ -855,15 +855,15 @@ public void noSchemaToJson() {
public void testCacheSchemaToJsonConversion() {
assertEquals(0, converter.sizeOfFromConnectSchemaCache());

// Repeated conversion of the same schema, even if the schema object is different, should return the same Java
// Repeated conversion of the same schema, even if the schema object is different should return the same Java
// object
converter.fromConnectData(TOPIC, SchemaBuilder.bool().build(), true);
assertEquals(1, converter.sizeOfFromConnectSchemaCache());

converter.fromConnectData(TOPIC, SchemaBuilder.bool().build(), true);
assertEquals(1, converter.sizeOfFromConnectSchemaCache());

// Validate that similar, but different schema correctly returns a different schema.
// Validate that a similar, but different schema correctly returns a different schema.
converter.fromConnectData(TOPIC, SchemaBuilder.bool().optional().build(), true);
assertEquals(2, converter.sizeOfFromConnectSchemaCache());
}
Expand Down

0 comments on commit 6f0c3db

Please sign in to comment.