Skip to content

fix: Unity.Netcode.RuntimeTests Failing on Console #1628

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

Closed

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Jan 27, 2022

This should fix the issues when running Unity.Netcode.RuntimeTests in a stand alone test runner build. These changes should get all console platforms passing for this assembly.
MTT-2288

With the fixes in place all consoles are passing Unity.Netcode.RuntimeTests:
image

Testing and Documentation

  • No tests have been added.
  • No documentation changes or additions were necessary.

This should fix the timing issues on consoles for the NetworkVariableTests.
Just added some additional comments.
This is a "quasi-fix" where I had to add the ability to run NetworkTransform in the FixedUpdate in order to get the NetworkTransform tests all passing when running in a stand alone test runner build.
Removed unused using statement.
This includes the fixes for getting NetworkVarBufferCopyTest to run on a stand alone test runner build.
white space missing.
This includes updates to the NetworkObjectOnSpawnTests in order to get it passing in stand alone test runner builds in order to get it to pass on consoles.
delta read was failing.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review January 28, 2022 10:22
NoelStephensUnity and others added 6 commits January 28, 2022 09:06
removing a portion of the comment as it was a copy-paste of code used in other fixes.
Removing the auto-assignment of the NetworkTransformTests's constructor's properties that were left over from troubleshooting.
@0xFA11 0xFA11 self-requested a review January 31, 2022 16:14
Applied suggestion by Fatih to use deltaTime with normal Update selected and fixedDeltaTime for FixedUpdate selected.
using the bool as opposed to direct method call for the while loops.
moving the HasTimedOut check to the end of each while loop to assure that any possible edge case scenario where it finishes just as it would be timing out is not missed.  An example would be the condition being checked is validated but it lands right on the timeout period.  The test would have been a success, but timedOut would have been set too.
re-applying readonly to the m_TestWithClientNetworkTransform and m_TestWithHost properties as that was changed during troubleshooting.
removing the timeout code to reduce confusion on the changes to NetworkVariableTests.
@0xFA11 0xFA11 removed their request for review January 31, 2022 22:01
NoelStephensUnity and others added 2 commits February 1, 2022 09:29
Came up with what I hope is a much better fix to get NetworkTransformTests passing on all consoles.  Passes on a windows stand alone test runner build...will need to run this on the consoles to verify the fix.
making sure NetworkTransform was exactly as it was before, removing a LF/CR
NoelStephensUnity and others added 14 commits February 1, 2022 16:13
removing whitespace.
This update collapses all of the time out code into the BaseMultiInstanceTest with an added method WaitForConditionOrTimeOut that leverages from an added TimeOutHelper class.
removing some of the Run calls and beginning to convert over some of the problematic tests to  just yield return the conditional check itself to avoid potential timing issues when checking the condition and yielding to the current test group's newly created coroutine.
removing MultiInstanceHelpers.Run calls from NetworkTransform as they are not needed.
removing more MultiInstanceHelpers.Run calls
The AllNetworkVariableTypes was not properly creating the NetworkManager based on the value of useHost
removing a using statement for a namespace that was not being used.
Reviewing the updated methods and making some minor adjustments.
fixed issue with WhenListContainsManyLargeValues_OverflowExceptionIsNotThrown count comparison value.

Updated removed FixedString32Test by removing  yield return that was not needed.
arrg!!!!!! white space
@NoelStephensUnity NoelStephensUnity changed the base branch from develop to release/1.1.0 February 3, 2022 17:45
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner February 3, 2022 17:45
@NoelStephensUnity NoelStephensUnity changed the base branch from release/1.1.0 to develop February 3, 2022 17:50
@NoelStephensUnity NoelStephensUnity marked this pull request as draft February 3, 2022 17:57
@NoelStephensUnity NoelStephensUnity changed the title fix: console tests failing fix: Unity.Netcode.RuntimeTests Failing on Console Feb 3, 2022
this fixes an issue I discovered in the IndexOf test.
@NoelStephensUnity NoelStephensUnity deleted the fix/console-tests-failing branch March 22, 2022 22:38
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.

3 participants