diff --git a/test/src/unit-cppapi-group.cc b/test/src/unit-cppapi-group.cc index 33eccbbc203..dcb8fc40222 100644 --- a/test/src/unit-cppapi-group.cc +++ b/test/src/unit-cppapi-group.cc @@ -301,6 +301,8 @@ TEST_CASE_METHOD( std::string array1_uri = vfs_test_setup_.array_uri("array1"); std::string array2_uri = vfs_test_setup_.array_uri("array2"); std::string array3_uri = vfs_test_setup_.array_uri("array3"); + std::cerr << array1_uri << std::endl; + create_array(array1_uri); create_array(array2_uri); @@ -310,20 +312,25 @@ TEST_CASE_METHOD( std::string group2_uri = vfs_test_setup_.array_uri("group2"); tiledb::Group::create(ctx_, group1_uri); tiledb::Group::create(ctx_, group2_uri); + std::cerr << group1_uri << std::endl; // Set expected + auto uri_format = [&](std::string uri) { + return vfs_test_setup_.is_rest() ? vfs_test_setup_.with_prefix(uri) : uri; + }; + auto expected_uri = vfs_test_setup_.is_rest() ? vfs_test_setup_.with_prefix(array1_uri) : array1_uri; std::vector group1_expected = { tiledb::Object( tiledb::Object::Type::Array, - vfs_test_setup_.with_prefix(array1_uri), + uri_format(array1_uri), "array1"), tiledb::Object( tiledb::Object::Type::Array, - vfs_test_setup_.with_prefix(array2_uri), + uri_format(array2_uri), "array2"), tiledb::Object( tiledb::Object::Type::Group, - vfs_test_setup_.with_prefix(group2_uri), + uri_format(group2_uri), "group2"), }; std::vector>> @@ -334,12 +341,13 @@ TEST_CASE_METHOD( std::vector group2_expected = { tiledb::Object( tiledb::Object::Type::Array, - vfs_test_setup_.with_prefix(array3_uri), + uri_format(array3_uri), "array3"), }; std::vector>> group2_exp_det = {{tiledb::Object::Type::Array, "array3"}}; + sleep(5); tiledb::Group group1(ctx_, group1_uri, TILEDB_WRITE); group1.close(); set_group_timestamp(&group1, 1); @@ -363,6 +371,7 @@ TEST_CASE_METHOD( group2.add_member(array3_uri, false, "array3"); } + sleep(5); // Close group from write mode group1.close(); group2.close(); @@ -392,6 +401,7 @@ TEST_CASE_METHOD( } // Close group + sleep(5); group1.close(); group2.close(); @@ -412,6 +422,7 @@ TEST_CASE_METHOD( group2_exp_det.clear(); // Close group + sleep(5); group1.close(); group2.close(); @@ -442,6 +453,7 @@ TEST_CASE_METHOD( REQUIRE_THROWS(group1.member(group1_expected.size())); // Close group + sleep(5); group1.close(); group2.close(); } @@ -465,18 +477,21 @@ TEST_CASE_METHOD( tiledb::Group::create(ctx_, group2_uri); // Set expected + auto uri_format = [&](std::string uri) { + return vfs_test_setup_.is_rest() ? vfs_test_setup_.with_prefix(uri) : uri; + }; std::vector group1_expected = { tiledb::Object( tiledb::Object::Type::Array, - vfs_test_setup_.with_prefix(array1_uri), + uri_format(array1_uri), std::nullopt), tiledb::Object( tiledb::Object::Type::Array, - vfs_test_setup_.with_prefix(array2_uri), + uri_format(array2_uri), std::nullopt), tiledb::Object( tiledb::Object::Type::Group, - vfs_test_setup_.with_prefix(group2_uri), + uri_format(group2_uri), std::nullopt), }; std::vector>> @@ -487,7 +502,7 @@ TEST_CASE_METHOD( std::vector group2_expected = { tiledb::Object( tiledb::Object::Type::Array, - vfs_test_setup_.with_prefix(array3_uri), + uri_format(array3_uri), std::nullopt), }; std::vector>>