Skip to content

Commit 33ff06d

Browse files
authored
Handle removal of 'StorageManager' from stats dumps in 2.27 (#2088)
1 parent dcef155 commit 33ff06d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

tiledb/tests/test_fixes.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,15 @@ def test_sc16301_arrow_extra_estimate_dense(self):
161161
with tiledb.open(uri) as A:
162162
tiledb.stats_enable()
163163
A[:]
164-
assert (
165-
""""Context.StorageManager.Query.Reader.loop_num": 1"""
166-
in tiledb.stats_dump(print_out=False)
167-
)
164+
165+
stats_dump_str = tiledb.stats_dump(print_out=False)
166+
if tiledb.libtiledb.version() >= (2, 27):
167+
assert """"Context.Query.Reader.loop_num": 1""" in stats_dump_str
168+
else:
169+
assert (
170+
""""Context.StorageManager.Query.Reader.loop_num": 1"""
171+
in stats_dump_str
172+
)
168173
tiledb.stats_disable()
169174

170175
@pytest.mark.skipif(

tiledb/tests/test_libtiledb.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3500,7 +3500,8 @@ def test_query(self):
35003500
q[:]
35013501

35023502
stats = q.get_stats(print_out=False)
3503-
assert "Context.StorageManager.Query" in stats
3503+
# check that the stats are non-empty
3504+
assert stats
35043505

35053506

35063507
class NullableIOTest(DiskTestCase):

0 commit comments

Comments
 (0)