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 flaky tests and refactor ObjectService #433

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

lanedirt
Copy link
Owner

@lanedirt lanedirt commented Nov 1, 2024

This PR contains the following:

  • Fixes flaky tests by ensuring all feature tests start with the same static time (2024-01-01). Some tests for building queues and fleet missions rely on advancing the time and testing whether missions have been processed and planets have been updated. Having all tests start with the same time ensures there are no conflicts. Addresses [BUG] Fix flaky espionage dispatch mission test #401.
  • Refactor ObjectService to be a static class instead of dependency injected as it contains no dependencies. This simplifies the code by not having to inject ObjectService into many places but instead be able to call it like ObjectService::getObjectXXX() instead.
  • Make SettingsService a proper singleton so any changes made to the settings are available everywhere preventing cache issues.

@lanedirt
Copy link
Owner Author

lanedirt commented Nov 3, 2024

I'm waiting with merging this until other open PR's are merged, as this refactor can cause conflicts with existing work in progress.

@lanedirt lanedirt merged commit 9e7e931 into main Nov 4, 2024
6 checks passed
@lanedirt lanedirt deleted the 401-fix-flaky-tests-refactor-time-starting-point branch November 9, 2024 16:15
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.

1 participant