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 3b90a21
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 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,12 @@ 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,
global_args=["--no-watch-filesystem", "--no-pantsd"],
args=["--tailor-alias-mapping={'fortran_library': 'my_fortran_lib'}", "::"],
)
assert result.exit_code == 0
assert result.stdout == dedent(
Expand Down

0 comments on commit 3b90a21

Please sign in to comment.