Skip to content

Commit 35288d0

Browse files
committed
Add back test which ensures consolidation can progress.
1 parent f24e075 commit 35288d0

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

test/src/unit-capi-consolidation.cc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7587,6 +7587,43 @@ TEST_CASE_METHOD(
75877587
}
75887588
}
75897589

7590+
TEST_CASE_METHOD(
7591+
ConsolidationFx,
7592+
"C API: Test consolidation, sparse string, no progress",
7593+
"[!shouldfail][capi][consolidation][sparse][string][no-progress][non-"
7594+
"rest]") {
7595+
remove_sparse_string_array();
7596+
create_sparse_string_array();
7597+
7598+
write_sparse_string_full();
7599+
write_sparse_string_unordered();
7600+
7601+
uint64_t string_size = 1;
7602+
7603+
SECTION("too small") {
7604+
string_size = 1;
7605+
}
7606+
7607+
// Consolidation currently fails to respect the memory budget.
7608+
// Once this is resolved, the test can be unmarked as `shouldfail`.
7609+
SECTION("too large") {
7610+
string_size = 60 * 10485760; // 6 GB (over default memory budget of 5GB)
7611+
}
7612+
7613+
consolidate_sparse_string(string_size, true);
7614+
7615+
tiledb_error_t* err = NULL;
7616+
tiledb_ctx_get_last_error(ctx_, &err);
7617+
7618+
const char* msg;
7619+
tiledb_error_message(err, &msg);
7620+
CHECK(
7621+
std::string("FragmentConsolidator: Consolidation read 0 cells, no "
7622+
"progress can be made") == msg);
7623+
7624+
remove_sparse_string_array();
7625+
}
7626+
75907627
TEST_CASE_METHOD(
75917628
ConsolidationFx,
75927629
"C API: Test consolidation, fragments/commits out of order",

0 commit comments

Comments
 (0)