You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by lz...@apache.org on 2022/08/23 08:50:57 UTC

[flink-table-store] branch master updated: [FLINK-29063] Fix FileFormatTest read the same value from file twice

This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e444561 [FLINK-29063] Fix FileFormatTest read the same value from file twice
3e444561 is described below

commit 3e4445611c97fde9b796f5be46385f945998f1c3
Author: Kirill Listopad <ki...@gmail.com>
AuthorDate: Tue Aug 23 11:50:53 2022 +0300

    [FLINK-29063] Fix FileFormatTest read the same value from file twice
    
    This closes #272
---
 .../java/org/apache/flink/table/store/file/FileFormatTest.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/flink-table-store-core/src/test/java/org/apache/flink/table/store/file/FileFormatTest.java b/flink-table-store-core/src/test/java/org/apache/flink/table/store/file/FileFormatTest.java
index e096cf00..32f2a12e 100644
--- a/flink-table-store-core/src/test/java/org/apache/flink/table/store/file/FileFormatTest.java
+++ b/flink-table-store-core/src/test/java/org/apache/flink/table/store/file/FileFormatTest.java
@@ -57,9 +57,9 @@ public class FileFormatTest {
         // write
 
         List<RowData> expected = new ArrayList<>();
-        expected.add(GenericRowData.of(1, 1));
-        expected.add(GenericRowData.of(2, 2));
-        expected.add(GenericRowData.of(3, 3));
+        expected.add(GenericRowData.of(1, 11));
+        expected.add(GenericRowData.of(2, 22));
+        expected.add(GenericRowData.of(3, 33));
         FSDataOutputStream out = fs.create(path, FileSystem.WriteMode.NO_OVERWRITE);
         BulkWriter<RowData> writer = avro.createWriterFactory(rowType).create(out);
         for (RowData row : expected) {
@@ -77,7 +77,7 @@ public class FileFormatTest {
         List<RowData> result = new ArrayList<>();
         Utils.forEachRemaining(
                 reader,
-                rowData -> result.add(GenericRowData.of(rowData.getInt(0), rowData.getInt(0))));
+                rowData -> result.add(GenericRowData.of(rowData.getInt(0), rowData.getInt(1))));
 
         assertThat(result).isEqualTo(expected);
     }