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

Various test changes #2930

Merged
merged 9 commits into from
Jun 20, 2022
Merged

Various test changes #2930

merged 9 commits into from
Jun 20, 2022

Conversation

wrexbe
Copy link
Contributor

@wrexbe wrexbe commented Jun 9, 2022

Tests fall apart when you try to reuse instances, these changes make them fall apart less often, and also let me bypass the current testing pool, so I can setup/clean/pool them differently.
Contains:

  • Duct tape
    • Ping handling ServerChannel being null so it doesn't blow up in the tests sometimes
    • UpdateAttachedEntity being better at dealing with garbage (although I think garbage still gets through sometimes)
    • Wrap _fromInstanceReader.ReadAsync(cancellationToken); in a try, catch. It just makes it more graceful if it cancels.
  • Pooling fixes
    • Make DataDefinitions not static, they are not the same between different instances (ex: client vs server, or different settings)
    • Add DoConnect to the _taskManager, which makes stuff wait for DoConnect to finish, which makes it more reliable, instead of based on luck.
  • Bypass Pooling
    • Made ServerIntegrationInstance, and ClientIntegrationInstance public, so I can avoid the built in pooling. (which is very unreliable right now)
  • Ignore missing types, and ids when removing prototypes with a string
    • If I add prototypes to both the client/server, they may not all be added because of differences between types
    • So I need remove to ignore missing things to undo what add is doing.

Content side (should not be needed for this PR): space-wizards/space-station-14#8737

@wrexbe wrexbe requested a review from PaulRitter June 10, 2022 16:58
@wrexbe wrexbe changed the title Make tests faster (DNM) Various test changes Jun 10, 2022
@ElectroJr ElectroJr merged commit f90872b into space-wizards:master Jun 20, 2022
@wrexbe wrexbe deleted the test-f branch June 20, 2022 00:05
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.

4 participants