Repository: TileDB-Inc/TileDB-Py

Issue:
Nightly Azure Wheel Fail on Fri, February 3rd 2023
See run for more details:
https://dev.azure.com/TileDB-Inc/CI/_build/results?buildId=$&view=results


Discussion:

Resolving patch:
diff --git a/examples/config.py b/examples/config.py
--- a/examples/config.py
+++ b/examples/config.py
@@ -55,8 +55,8 @@ def set_get_config():
     config["vfs.s3.connect_timeout_ms"] = 5000
 
     # Get value
-    tile_cache_size = config["sm.tile_cache_size"]
-    print("Tile cache size: %s" % str(tile_cache_size))
+    tile_cache_size = config["sm.memory_budget"]
+    print("Memory budget: %s" % str(tile_cache_size))
 
 
 def print_default():
@@ -77,14 +77,14 @@ def iter_config_with_prefix():
 def save_load_config():
     # Save to file
     config = tiledb.Config()
-    config["sm.tile_cache_size"] = 0
+    config["sm.memory_budget"] = 1234
     config.save("tiledb_config.txt")
 
     # Load from file
     config_load = tiledb.Config.load("tiledb_config.txt")
     print(
         "\nTile cache size after loading from file: %s"
-        % str(config_load["sm.tile_cache_size"])
+        % str(config_load["sm.memory_budget"])
     )
 
 


Test patch:
diff --git a/tiledb/tests/cc/test_group.py b/tiledb/tests/cc/test_group.py
--- a/tiledb/tests/cc/test_group.py
+++ b/tiledb/tests/cc/test_group.py
@@ -1,4 +1,5 @@
 import os
+import time
 
 import numpy as np
 from numpy.testing import assert_array_equal
@@ -27,6 +28,7 @@ def test_group_metadata(tmp_path):
     assert_array_equal(grp._get_metadata("flt")[0], flt_data)
     grp._close()
 
+    time.sleep(0.001)
     grp._open(lt.QueryType.WRITE)
     grp._delete_metadata("int")
     grp._close()
diff --git a/tiledb/tests/test_context_and_config.py b/tiledb/tests/test_context_and_config.py
--- a/tiledb/tests/test_context_and_config.py
+++ b/tiledb/tests/test_context_and_config.py
@@ -49,14 +49,14 @@ def test_default_ctx_errors(self):
         ) == str(excinfo.value)
 
     def test_scope_ctx(self):
-        key = "sm.tile_cache_size"
+        key = "sm.memory_budget"
         ctx0 = tiledb.default_ctx()
         new_config_dict = {key: 42}
         new_config = tiledb.Config({key: 78})
         new_ctx = tiledb.Ctx({key: 61})
 
         assert tiledb.default_ctx() is ctx0
-        assert tiledb.default_ctx().config()[key] == "10000000"
+        assert tiledb.default_ctx().config()[key] == "5368709120"
 
         with tiledb.scope_ctx(new_config_dict) as ctx1:
             assert tiledb.default_ctx() is ctx1
@@ -73,7 +73,7 @@ def test_scope_ctx(self):
             assert tiledb.default_ctx().config()[key] == "42"
 
         assert tiledb.default_ctx() is ctx0
-        assert tiledb.default_ctx().config()[key] == "10000000"
+        assert tiledb.default_ctx().config()[key] == "5368709120"
 
     def test_scope_ctx_error(self):
         with pytest.raises(ValueError) as excinfo:
@@ -111,14 +111,14 @@ def test_init_config(self):
 class TestConfig(DiskTestCase):
     def test_config(self):
         config = tiledb.Config()
-        config["sm.tile_cache_size"] = 100
+        config["sm.memory_budget"] = 103
         assert repr(config) is not None
         tiledb.Ctx(config)
 
     def test_ctx_config(self):
-        ctx = tiledb.Ctx({"sm.tile_cache_size": 100})
+        ctx = tiledb.Ctx({"sm.memory_budget": 103})
         config = ctx.config()
-        self.assertEqual(config["sm.tile_cache_size"], "100")
+        self.assertEqual(config["sm.memory_budget"], "103")
 
     def test_vfs_config(self):
         config = tiledb.Config()
@@ -150,11 +150,11 @@ def test_config_bad_param(self):
 
     def test_config_unset(self):
         config = tiledb.Config()
-        config["sm.tile_cach_size"] = 100
-        del config["sm.tile_cache_size"]
+        config["sm.memory_budget"] = 103
+        del config["sm.memory_budget"]
         # check that config parameter is default
         self.assertEqual(
-            config["sm.tile_cache_size"], tiledb.Config()["sm.tile_cache_size"]
+            config["sm.memory_budget"], tiledb.Config()["sm.memory_budget"]
         )
 
     def test_config_from_file(self):
@@ -166,24 +166,24 @@ def test_config_from_file(self):
 
         config_path = self.path("config")
         with tiledb.FileIO(self.vfs, config_path, "wb") as fh:
-            fh.write("sm.tile_cache_size 100")
+            fh.write("sm.memory_budget 100")
         config = tiledb.Config.load(config_path)
-        self.assertEqual(config["sm.tile_cache_size"], "100")
+        self.assertEqual(config["sm.memory_budget"], "100")
 
     def test_ctx_config_from_file(self):
         config_path = self.path("config")
         vfs = tiledb.VFS()
         with tiledb.FileIO(vfs, config_path, "wb") as fh:
-            fh.write("sm.tile_cache_size 100")
+            fh.write("sm.memory_budget 100")
         ctx = tiledb.Ctx(config=tiledb.Config.load(config_path))
         config = ctx.config()
-        self.assertEqual(config["sm.tile_cache_size"], "100")
+        self.assertEqual(config["sm.memory_budget"], "100")
 
     def test_ctx_config_dict(self):
-        ctx = tiledb.Ctx(config={"sm.tile_cache_size": "100"})
+        ctx = tiledb.Ctx(config={"sm.memory_budget": "100"})
         config = ctx.config()
         assert issubclass(type(config), tiledb.libtiledb.Config)
-        self.assertEqual(config["sm.tile_cache_size"], "100")
+        self.assertEqual(config["sm.memory_budget"], "100")
 
     def test_config_repr_html(self):
         config = tiledb.Config()