Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Heisterkamp committed Sep 30, 2022
1 parent adc7d97 commit 3b00b34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 6 additions & 7 deletions tests/cluster/eh/test_eh_saving.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion tests/cluster/mount/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
)

0 comments on commit 3b00b34

Please sign in to comment.