Skip to content

Reenable and fix flaky tests #1837

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

Gold856
Copy link
Contributor

@Gold856 Gold856 commented Mar 22, 2025

Description

It looks like at some point during WPILib's development, the NT issues that were plaguing us were fixed. Due to the fact that Alerts cannot be properly reset in unit tests, the ordering of PhotonCameraTest has been fixed such that testAlerts is always first, and therefore is not impacted by the NT instances being reset. In addition, unit tests are now executed such that each class is given its own JVM so we don't run into the 16 NT instance limit.
Closes #1574.

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with settings back to v2024.3.1
  • If this PR addresses a bug, a regression test for it is added

@Gold856 Gold856 requested a review from a team as a code owner March 22, 2025 04:55
@mcm001
Copy link
Contributor

mcm001 commented Mar 22, 2025

Descriptive!

@Gold856
Copy link
Contributor Author

Gold856 commented Mar 22, 2025

Whoops, I forgot to switch the repo to my fork.

@Gold856 Gold856 marked this pull request as draft March 22, 2025 05:56
@Gold856
Copy link
Contributor Author

Gold856 commented Mar 22, 2025

Well, at least we know which tests are failing. Seems to have gotten worse than when we disabled them.

@mcm001
Copy link
Contributor

mcm001 commented Mar 22, 2025

Yeah. It seems they have bitrotted

@Gold856 Gold856 force-pushed the tests branch 4 times, most recently from 2db2104 to 3d096a5 Compare April 27, 2025 06:34
@Gold856
Copy link
Contributor Author

Gold856 commented Apr 28, 2025

Investigation concluded that the construction of PhotonCamera in a prior test causes testAlerts to fail. Likely due to retained state with Alerts.

@Gold856 Gold856 force-pushed the tests branch 6 times, most recently from 82d2438 to c569fb3 Compare May 1, 2025 16:03
@Gold856 Gold856 changed the title Reenable tests Reenable and fix flaky tests May 1, 2025
@Gold856 Gold856 force-pushed the tests branch 3 times, most recently from ce448d6 to 8d4cc40 Compare May 4, 2025 03:48
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.

Flakey "Photonlib - Build Host - Win64" job
2 participants