From 2d76d32ca5ec6aa073d73cd3d4b49df949c14e5e Mon Sep 17 00:00:00 2001 From: Vivian Nguyen Date: Tue, 27 Jun 2023 09:38:31 -0400 Subject: [PATCH] Fix timestamps? --- tiledb/tests/cc/test_cc.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tiledb/tests/cc/test_cc.py b/tiledb/tests/cc/test_cc.py index 4d6d585a1d..bda97b1386 100644 --- a/tiledb/tests/cc/test_cc.py +++ b/tiledb/tests/cc/test_cc.py @@ -121,16 +121,20 @@ def test_array(): arr.close() #### arrw = lt.Array(ctx, uri, lt.QueryType.WRITE) + arr.reopen() arrw.set_open_timestamp_start(1) arrw.set_open_timestamp_end(1) + arr.reopen() data = b"abcdef" arrw.put_metadata("key", lt.DataType.STRING_ASCII, data) arrw.close() arr = lt.Array(ctx, uri, lt.QueryType.READ) - arrw.set_open_timestamp_start(1) - arrw.set_open_timestamp_end(1) + arr.reopen() + arr.set_open_timestamp_start(1) + arr.set_open_timestamp_end(1) + arr.reopen() assert arr.metadata_num() == 1 assert arr.has_metadata("key") mv = arr.get_metadata("key") @@ -144,14 +148,18 @@ def test_array(): arr.close() arrw = lt.Array(ctx, uri, lt.QueryType.WRITE) + arr.reopen() arrw.set_open_timestamp_start(2) arrw.set_open_timestamp_end(2) + arr.reopen() arrw.delete_metadata("key") arrw.close() arr = lt.Array(ctx, uri, lt.QueryType.READ) - arrw.set_open_timestamp_start(3) - arrw.set_open_timestamp_end(3) + arr.reopen() + arr.set_open_timestamp_start(3) + arr.set_open_timestamp_end(3) + arr.reopen() with pytest.raises(KeyError): arr.get_metadata("key") assert not arr.has_metadata("key")[0]