hantangwangd commented on code in PR #10369: URL: https://github.com/apache/iceberg/pull/10369#discussion_r1624863729
########## core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java: ########## @@ -2655,6 +2656,68 @@ public void testCleanupCleanableExceptionsReplace() { .isInstanceOf(NotFoundException.class); } + @ParameterizedTest + @ValueSource(strings = {"1", "2"}) + public void testCreateTableTransaction(String formatVersion) { + RESTCatalogAdapter adapter = Mockito.spy(new RESTCatalogAdapter(backendCatalog)); + RESTCatalog catalog = catalog(adapter); + + if (requiresNamespaceCreate()) { + catalog.createNamespace(NS); + } + + // Test create table transaction with no data file + Transaction createTableTransaction1 = + catalog.newCreateTableTransaction( + TableIdentifier.of(NS, "table1"), + SCHEMA, + PartitionSpec.unpartitioned(), + ImmutableMap.of("format-version", formatVersion)); + assertThatNoException().isThrownBy(() -> createTableTransaction1.commitTransaction()); Review Comment: Tests have been moved to `CatalogTests`, and modified as your suggestion. Please take a look when available, thanks a lot. -- 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