lishuxu commented on code in PR #152: URL: https://github.com/apache/iceberg-cpp/pull/152#discussion_r2249510586
########## test/in_memory_catalog_test.cc: ########## @@ -115,6 +114,50 @@ TEST_F(InMemoryCatalogTest, RegisterTable) { ASSERT_EQ(table.value()->location(), "s3://bucket/test/location"); } +TEST_F(InMemoryCatalogTest, RefreshTable) { + TableIdentifier tableIdent{.ns = {}, .name = "t1"}; + std::shared_ptr<MockInMemoryCatalog> mock_catalog = + std::make_shared<MockInMemoryCatalog>( + "mock_catalog", file_io_, "/tmp/warehouse/", + std::unordered_map<std::string, std::string>()); + auto table_location = GenerateTestTableLocation(tableIdent.name); + auto buildTable = [this, &tableIdent, &mock_catalog, &table_location]( + int64_t snapshot_id, int64_t version) -> std::unique_ptr<Table> { + std::unique_ptr<TableMetadata> metadata; + + ReadTableMetadata("TableMetadataV2Valid.json", &metadata); Review Comment: I simplified the buildTable lambda logic — the steps are simple too. -- 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