Skip to content

Commit

Permalink
WIP use timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenv committed Jun 27, 2023
1 parent e90845d commit 4179988
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tiledb/tests/cc/test_cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,16 @@ def test_array():
arr.close()
####
arrw = lt.Array(ctx, uri, lt.QueryType.WRITE)
arrw.set_open_timestamp_start(1)
arrw.set_open_timestamp_end(1)

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)
assert arr.metadata_num() == 1
assert arr.has_metadata("key")
mv = arr.get_metadata("key")
Expand All @@ -140,10 +144,14 @@ def test_array():
arr.close()

arrw = lt.Array(ctx, uri, lt.QueryType.WRITE)
arrw.set_open_timestamp_start(2)
arrw.set_open_timestamp_end(2)
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)
with pytest.raises(KeyError):
arr.get_metadata("key")
assert not arr.has_metadata("key")[0]
Expand Down

0 comments on commit 4179988

Please sign in to comment.