RussellSpitzer commented on code in PR #11346:
URL: https://github.com/apache/iceberg/pull/11346#discussion_r1815721238


##########
kafka-connect/kafka-connect/src/test/java/org/apache/iceberg/connect/data/RecordConverterTest.java:
##########
@@ -921,11 +948,26 @@ private void assertRecordValues(Record record) {
     assertThat(rec.getField("dec")).isEqualTo(DEC_VAL);
     assertThat(rec.getField("s")).isEqualTo(STR_VAL);
     assertThat(rec.getField("b")).isEqualTo(true);
-    assertThat(rec.getField("u")).isEqualTo(UUID_VAL);
-    assertThat(rec.getField("f")).isEqualTo(BYTES_VAL);
+    assertThat(rec.getField("f")).isEqualTo(BYTES_VAL.array());
     assertThat(rec.getField("bi")).isEqualTo(BYTES_VAL);
     assertThat(rec.getField("li")).isEqualTo(LIST_VAL);
     assertThat(rec.getField("ma")).isEqualTo(MAP_VAL);
+
+    IcebergSinkConfig icebergSinkConfig = mock(IcebergSinkConfig.class);
+    
when(icebergSinkConfig.tableConfig(any())).thenReturn(mock(TableSinkConfig.class));
+    when(icebergSinkConfig.writeProps())
+        .thenReturn(ImmutableMap.of(TableProperties.DEFAULT_FILE_FORMAT, 
format));
+    WriteResult result =
+        writeTest(ImmutableList.of(rec), icebergSinkConfig, 
UnpartitionedWriter.class);
+
+    if (format.equals(FileFormat.PARQUET.name().toLowerCase(Locale.ROOT))) {
+      assertThat(rec.getField("u")).isEqualTo(UUIDUtil.convert(UUID_VAL));

Review Comment:
   In generally I don't like replicating the implementation logic in the test. 
Can we check this in a more agnostic way? 



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to