Skip to content

Wait before exiting testWidgets#174

Merged
daniel-beck merged 2 commits intojenkinsci:masterfrom
MarkEWaite:wait-before-exiting-testWidgets
Jul 16, 2025
Merged

Wait before exiting testWidgets#174
daniel-beck merged 2 commits intojenkinsci:masterfrom
MarkEWaite:wait-before-exiting-testWidgets

Conversation

@MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Jul 8, 2025

Wait before exiting testWidgets

The testWidgets test has failed 2 out of 2 builds on the master branch since the transition of ci.jenkins.io from Azure to AWS. Other plugins have seen similar behavior and have reduced the failures significantly by waiting several seconds at the end of the test before exiting the test.

Pull requests that have used that technique include:

A 3 second sleep was enough to pass 3 of 4 test runs in pull request:

Testing done

Confirmed that the tests pass locally. Confirmed that the tests pass on ci.jenkins.io 9 of 9 times. Ready for review

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

The testWidgets() test fails consistently on ci.jenkins.io since the
transition from Azure to AWS.  Since the tests are already using long
sleep calls for various other purposes, let's sleep at the exit from
the failing test so that there is time for Java to close files.

Testing done

Confirmed that `mvn clean verify` passes on my Linux computer.  Rely on
ci.jenkins.io to confirm the fix works on Windows.
The 3 second sleep was enough in 3 of 4 test runs.  Let's see if a 5
second sleep improves the failure rate.
@MarkEWaite MarkEWaite requested a review from a team as a code owner July 8, 2025 10:38
@MarkEWaite MarkEWaite marked this pull request as draft July 8, 2025 10:38
@MarkEWaite MarkEWaite marked this pull request as ready for review July 8, 2025 17:50
@daniel-beck
Copy link
Member

Seems like something that should be done in JTH, no? Or are the conditions so unusual that this is not widespread?

@MarkEWaite
Copy link
Contributor Author

Seems like something that should be done in JTH, no? Or are the conditions so unusual that this is not widespread?

It is not widespread as far as I can tell. From the 100+ plugins that I checked as part of Monday's transition from Azure to AWS, I found less than five cases that needed this type of change. Two of those cases were specifically related to the Maven project type. I don't know the details of the conditions that cause the failure and was unwilling to spend the time to investigate those details because there were so few failing cases among so many tests.

@daniel-beck daniel-beck merged commit 0408c70 into jenkinsci:master Jul 16, 2025
17 checks passed
@MarkEWaite MarkEWaite deleted the wait-before-exiting-testWidgets branch July 20, 2025 21:50
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.

2 participants