Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix checking TEST_PREMATURE_EXIT_FILE #24657

Closed

Conversation

meteorcloudy
Copy link
Member

@meteorcloudy meteorcloudy commented Dec 12, 2024

TEST_PREMATURE_EXIT_FILE was not cleaned up between test attempts.

Fixes #24655

@meteorcloudy meteorcloudy requested review from fmeum and lberki and removed request for fmeum December 12, 2024 13:59
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Dec 12, 2024
if (actionExecutionContext
.getPathResolver()
.convertPath(resolvedPaths.getExitSafeFile())
.delete() && testResultDataBuilder.getTestPassed()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see three different changes in this PR:

  1. This block has been moved further down.
  2. The block only triggers if the test would otherwise pass.
  3. The file is deleted.

While all three make sense, which one (or which subset) is required to fix the bug? I would have guessed that only 2. should be necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the change actually fixed the issue is actually "deleting the TEST_PREMATURE_EXIT_FILE when the test times out"

Initially, I thought it could be fixed by just changing exists to delete, but it didn't work.

@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Dec 12, 2024
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Dec 12, 2024
`TEST_PREMATURE_EXIT_FILE` was not cleaned up between test attempts (--flaky_test_attempts).

Fixes bazelbuild#24655

Closes bazelbuild#24657.

PiperOrigin-RevId: 705495967
Change-Id: Ic4d4be1e72230c3a6bc45c9f372d1188fefad201
github-merge-queue bot pushed a commit that referenced this pull request Dec 12, 2024
`TEST_PREMATURE_EXIT_FILE` was not cleaned up between test attempts
(--flaky_test_attempts).

Fixes #24655

Closes #24657.

PiperOrigin-RevId: 705495967
Change-Id: Ic4d4be1e72230c3a6bc45c9f372d1188fefad201

Commit
b33d51f

Co-authored-by: Yun Peng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bazel's java tests sometimes fail with all test cases passed but TEST_PREMATURE_EXIT_FILE exists
2 participants