Skip to content

Commit

Permalink
[graphql] defend against hang in backfill test (#26136)
Browse files Browse the repository at this point in the history
Had an error cause these tests to hang indefinitely, prevent that from
happening again

## How I Tested These Changes

bk
  • Loading branch information
alangenfeld authored Dec 5, 2024
1 parent aaac011 commit b3df320
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,13 @@ def test_cancel_asset_backfill(self, graphql_context):

assert not result.errors
assert result.data
assert result.data["launchPipelineExecution"]["__typename"] == "LaunchRunSuccess"

# ensure the execution has happened
start = time.time()
while not os.path.exists(path):
time.sleep(0.1)
assert time.time() - start < 60, "timed out waiting for file"

result = execute_dagster_graphql(
graphql_context,
Expand Down Expand Up @@ -763,10 +766,13 @@ def test_cancel_then_retry_asset_backfill(self, graphql_context):

assert not result.errors
assert result.data
assert result.data["launchPipelineExecution"]["__typename"] == "LaunchRunSuccess"

# ensure the execution has happened
start = time.time()
while not os.path.exists(path):
time.sleep(0.1)
assert time.time() - start < 60, "timed out waiting for file"

result = execute_dagster_graphql(
graphql_context,
Expand Down

0 comments on commit b3df320

Please sign in to comment.