Skip to content

Commit

Permalink
Fix race condition in tailor test
Browse files Browse the repository at this point in the history
  • Loading branch information
benjyw committed Apr 2, 2023
1 parent cc6b134 commit 5b4b5f8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/python/pants/core/goals/tailor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,16 @@ def test_tailor_rule_write_mode(rule_runner: RuleRunner) -> None:
"conflict/BUILD": "fortran_library(sources=['f1.f90'])",
}
)
# Ensure the test invocation of Pants doesn't restart itself after it writes the tailored files,
# and then chokes on the invalid BUILD symbol.
result = rule_runner.run_goal_rule(
TailorGoal, args=["--alias-mapping={'fortran_library': 'my_fortran_lib'}", "::"]
TailorGoal,
args=[
"--no-watch_filesystem",
"--no-pantsd",
"--tailor-alias-mapping={'fortran_library': 'my_fortran_lib'}",
"::",
],
)
assert result.exit_code == 0
assert result.stdout == dedent(
Expand Down

0 comments on commit 5b4b5f8

Please sign in to comment.