Skip to content

Commit

Permalink
remove wait for deployment job code
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Dec 13, 2024
1 parent cd8a582 commit 2133a30
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions integration/tests/posit/connect/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,6 @@ def _remove_all_caches(self):
task.wait_for()
assert len(self.client.system.caches.runtime.find()) == 0

def _wait_for_cache_jobs(self):
start_time = time.time()
continue_while = True
while continue_while:
now_time = time.time()
if now_time - start_time > 30:
raise TimeoutError("Timeout while waiting for cache to deploy")

jobs = self.content_item.jobs.fetch()
if len(list(jobs)) == 0:
# No jobs found, restart while loop
continue

for job in jobs:
if str(job["status"]) == "0":
# Stop for loop and restart while loop
break
else:
# Only executed if the for loop did NOT break

# Break the while loop
continue_while = False

@classmethod
def teardown_class(cls):
cls.content_item.delete()
Expand All @@ -82,9 +59,6 @@ def test_runtime_caches(self):
# Deploy a new cache
self._deploy_python_bundle()

# Wait for the cache jobs to finish
self._wait_for_cache_jobs()

# Check if the cache is deployed
caches = self.client.system.caches.runtime.find()

Expand Down

0 comments on commit 2133a30

Please sign in to comment.