Migrate non TestBase related and Data classes in Flink#10130
Conversation
| required(117, "time", Types.TimeType.get())); | ||
|
|
||
| @Rule public TemporaryFolder temp = new TemporaryFolder(); | ||
| @TempDir public Path temp; |
| .build()) { | ||
| CloseableIterator it = reader.iterator(); | ||
| Assert.assertTrue("Should have at least one row", it.hasNext()); | ||
| assertThat(it.hasNext()).isTrue(); |
There was a problem hiding this comment.
| assertThat(it.hasNext()).isTrue(); | |
| assertThat(it).hasNext(); |
| Assert.assertFalse("Should not have more than one row", it.hasNext()); | ||
| assertThat(actualRecord.get(0, ArrayList.class)).first().isEqualTo(expectedBinary); | ||
| assertThat(actualRecord.get(1, ByteBuffer.class)).isEqualTo(expectedBinary); | ||
| assertThat(it.hasNext()).isFalse(); |
| fileSchema -> GenericParquetReaders.buildReader(schema, fileSchema)) | ||
| .build() | ||
| .iterator()) | ||
| .as("Decrypted without keys") |
There was a problem hiding this comment.
.as() isn't needed. It should rather have a .hasMessage check
| Assert.assertFalse("Should not have more than one row", it.hasNext()); | ||
| assertThat(actualRecord.get(0, ArrayList.class)).first().isEqualTo(expectedBinary); | ||
| assertThat(actualRecord.get(1, ByteBuffer.class)).isEqualTo(expectedBinary); | ||
| assertThat(it.hasNext()).isFalse(); |
| Iterator<RowData> rows = reader.iterator(); | ||
| for (int i = 0; i < numRecord; i++) { | ||
| Assert.assertTrue("Should have expected number of records", rows.hasNext()); | ||
| assertThat(rows.hasNext()).isTrue(); |
There was a problem hiding this comment.
same as previously mentioned. please also update all other places
|
@nastra thanks for the review. Reflected your feedback and migrate other classes. Could you review? |
| import org.junit.jupiter.api.Test; | ||
| import org.junit.jupiter.api.io.TempDir; | ||
|
|
||
| public class TestRowProjection { |
There was a problem hiding this comment.
In the Flink codebase we need to make sure that the same code changes are being applied across all 3 versions. So if you're touching this file here, you would also need to make sure to apply the same changes for the other Flink versions.
This can be either done within the same PR or in an immediate follow-up that backports the same changes to earlier versions
|
changes LGTM, can you please backport these changes to earlier Flink versions? |
|
Sure. Will submit a PR for backporting. Thank you. |
Migrate the following classes in
iceberg-flinkandiceberg-datato JUnit 5 for #9087Current Progress
iceberg-flink(v1.18)AvroGenericRecordConverterBaseTestAvroGenericRecordToRowDataMapperTestRowDataToAvroGenericRecordConverterTestDataFileSerializationTestFlinkCatalogFactoryTestFlinkFiltersTestFlinkSchemaUtilTestManifestFileSerializationTestRowDataWrapper(<RecordWrapperTest)TestTableSerializationutil/TestFlinkPackagedata/TestFlinkAvroReaderWriter(<DataTest) (including v1.16 and v1.17)TestFlinkOrcReaderWriter(<DataTest) (including v1.16 and v1.17)TestFlinkParquetReader(<DataTest) (including v1.16 and v1.17)TestFlinkParquetWriter(<DataTest) (including v1.16 and v1.17)TestRowProjectionTestStructRowDataDataTestrelated classes iniceberg-data:avro/TestGenericDataorc/TestGenericDataparquet/TestGenericDataTestParquetEncryptionWithWriteSupport