You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2023/03/21 05:29:11 UTC

[incubator-paimon] branch master updated: [hotfix] Fix compile by TestFileFormatFactory

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/incubator-paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new e7b9920e6 [hotfix] Fix compile by TestFileFormatFactory
e7b9920e6 is described below

commit e7b9920e61a3d7ddf1e5153088bfe29f8916d7e6
Author: JingsongLi <lz...@aliyun.com>
AuthorDate: Tue Mar 21 13:29:03 2023 +0800

    [hotfix] Fix compile by TestFileFormatFactory
---
 .../paimon/format/TestFileFormatFactory.java       | 34 ----------------------
 1 file changed, 34 deletions(-)

diff --git a/paimon-common/src/test/java/org/apache/paimon/format/TestFileFormatFactory.java b/paimon-common/src/test/java/org/apache/paimon/format/TestFileFormatFactory.java
deleted file mode 100644
index 67ffbe614..000000000
--- a/paimon-common/src/test/java/org/apache/paimon/format/TestFileFormatFactory.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.paimon.format;
-
-import org.apache.paimon.options.Options;
-
-import org.junit.jupiter.api.Test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-
-public class TestFileFormatFactory implements FileFormatFactory {
-
-    @Override
-    public String identifier() {
-        return "test";
-    }
-
-    @Override
-    public FileFormat create(FormatContext context) {
-        assertThat(context.formatOptions().get("hello")).isEqualTo("world");
-        assertThat(context.readBatchSize()).isEqualTo(1024);
-        throw new SuccessException();
-    }
-
-    public static class SuccessException extends RuntimeException {}
-
-    @Test
-    public void testCreateFileFormat() {
-        Options options = new Options();
-        options.setString("hello", "world");
-        assertThrows(
-                SuccessException.class,
-                () -> new TestFileFormatFactory().create(new FormatContext(options, 1024)));
-    }
-}