You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "coded9 (via GitHub)" <gi...@apache.org> on 2023/07/14 10:45:04 UTC
[GitHub] [iceberg] coded9 commented on a diff in pull request #8058: HiveMetaStore : Junit5 Upgrade
coded9 commented on code in PR #8058:
URL: https://github.com/apache/iceberg/pull/8058#discussion_r1263587635
##########
hive-metastore/src/test/java/org/apache/iceberg/hive/HiveCreateReplaceTableTest.java:
##########
@@ -53,49 +52,49 @@ public class HiveCreateReplaceTableTest extends HiveMetastoreTest {
required(3, "id", Types.IntegerType.get()), required(4, "data", Types.StringType.get()));
private static final PartitionSpec SPEC = builderFor(SCHEMA).identity("id").build();
- @Rule public TemporaryFolder temp = new TemporaryFolder();
+ @TempDir private Path temp;
private String tableLocation;
- @Before
+ @BeforeEach
public void createTableLocation() throws IOException {
- tableLocation = temp.newFolder("hive-").getPath();
+ tableLocation = temp.resolve("hive-").toString();
}
- @After
+ @AfterEach
public void cleanup() {
catalog.dropTable(TABLE_IDENTIFIER);
}
@Test
public void testCreateTableTxn() {
- Assert.assertFalse("Table should not exist", catalog.tableExists(TABLE_IDENTIFIER));
+ Assertions.assertThat(catalog.tableExists(TABLE_IDENTIFIER)).as("Table should not exist").isFalse();
Transaction txn =
catalog.newCreateTableTransaction(
TABLE_IDENTIFIER, SCHEMA, SPEC, tableLocation, Maps.newHashMap());
txn.updateProperties().set("prop", "value").commit();
// verify the table is still not visible before the transaction is committed
- Assert.assertFalse(catalog.tableExists(TABLE_IDENTIFIER));
+ Assertions.assertThat(catalog.tableExists(TABLE_IDENTIFIER)).isFalse();
txn.commitTransaction();
Table table = catalog.loadTable(TABLE_IDENTIFIER);
- Assert.assertEquals("Table props should match", "value", table.properties().get("prop"));
+ Assertions.assertThat( table.properties().get("prop")).as("Table props should match").isEqualTo("value");
Review Comment:
Addressed.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org