From 3b00b3458396893880ea1cd0d7dfc9e9a581deda Mon Sep 17 00:00:00 2001 From: Simon Heisterkamp Date: Fri, 30 Sep 2022 12:57:56 +0000 Subject: [PATCH] fix test --- tests/cluster/eh/test_eh_saving.py | 13 ++++++------- tests/cluster/mount/__init__.py | 4 +++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/cluster/eh/test_eh_saving.py b/tests/cluster/eh/test_eh_saving.py index 12a3517f..9cebfb58 100644 --- a/tests/cluster/eh/test_eh_saving.py +++ b/tests/cluster/eh/test_eh_saving.py @@ -36,20 +36,19 @@ def test_02_wait_for_capture_files(self): # wait until capture file appears dbutils = init_dbutils() + silverContainer = TableConfigurator().table_name("storageAccount") + limit = datetime.now() + timedelta(minutes=10) + conts = None while datetime.now() < limit: - conts = { - item.name - for item in dbutils.fs.ls( - TableConfigurator().table_name("storageAccount") - ) - } + conts = {item.name for item in dbutils.fs.ls(silverContainer)} if "githubatc/" in conts: break else: time.sleep(10) continue else: + print("Only found:", conts) self.assertTrue(False, "The capture file never appeared.") self.assertTrue(True, "The capture file has appeared.") @@ -59,7 +58,7 @@ def test_03_read_eh_capture(self): tc.register( "AtcEh", { - "name": "AtcEh", + "name": "AtcEhTable", "path": "{storageAccount}/githubatc/atceh", "format": "avro", "partitioning": "ymd", diff --git a/tests/cluster/mount/__init__.py b/tests/cluster/mount/__init__.py index 0eb13045..2bc991f7 100644 --- a/tests/cluster/mount/__init__.py +++ b/tests/cluster/mount/__init__.py @@ -29,4 +29,6 @@ def prepare_environment(): ) # This is an abbreviation to access the storage account - TableConfigurator().set_extra(storageAccount=f"abfss://silver@{storageAccount}") + TableConfigurator().register( + "storageAccount", dict(name=f"abfss://silver@{storageAccount}") + )