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

[BUG] FleetDispatchAttackTest is flaky and fails sometimes #472

Closed
lanedirt opened this issue Dec 2, 2024 · 1 comment
Closed

[BUG] FleetDispatchAttackTest is flaky and fails sometimes #472

lanedirt opened this issue Dec 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@lanedirt
Copy link
Owner

lanedirt commented Dec 2, 2024

Describe the bug
The following test fails sometimes when it runs against new PR's.

FAILED  Tests\Feature\FleetDispatch\FleetDispatchAttackTest > dispatch fl…   
  Defender still has same amount of metal after battle while it was expected they lost some.
Failed asserting that OGame\Models\Resource Object #11716 (
    'rawValue' => 240.0,
) is less than OGame\Models\Resource Object #8544 (
    'rawValue' => 240.0,
).

Check the test logic and change it so its not flaky anymore. This test logic tests the battle engine which results are random by nature, so this test will have to be updated so the chance that the test has it wrong is less likely (near zero). Alternatively these battle engine tests should implement a retry logic.

@lanedirt lanedirt added the bug Something isn't working label Dec 2, 2024
@lanedirt
Copy link
Owner Author

lanedirt commented Jan 8, 2025

This issue was fixed as part of PR #514. The test has been rewritten to use a new (clean) planet as the target instead of an existing planet, as sometimes an existing planet had other active missions flying towards it which skewed the expected results.

@lanedirt lanedirt closed this as completed Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant