Skip to content

test: make test runner scene ignored by default for BaseMultiInstanceTest #1154

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

Conversation

NoelStephensUnity
Copy link
Collaborator

This just updates the BaseMultiInstanceTest class to automatically ignore the testrunner scene when clients are synchronizing as well as registers the testrunner scene automatically for NetworkObject synchronization. The primary purpose behind this PR is to just further simplify BaseMultiInstanceTest usage without having to re-write the same code repeatedly.

Specific to testing, this adds the ability to ignore the warning message when scene validation fails so we don't spam log.
If not already set, making the test runner scene a default scene for clients to not try to synchronize.  This also will register the test runner scene so that other associated warning messages will not log-spam.
This update allows one to add an additional start initialization action to be invoked when just after the server-host is started and after each client is started for scenarios where you need to access sub-systems that are only initialized when the NetworkManager is started (client, host, or server).

Made minor modifications to the BaseMultiInstanceTest to reflect the above changes.
included 1 whitespace
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review September 8, 2021 17:44
updated comment and removed a LF
updated comment.
updated comment.
using startInitializationCallback?.Invoke(server); as opposed to checking for null.
@NoelStephensUnity NoelStephensUnity merged commit 599ed68 into develop Sep 9, 2021
@NoelStephensUnity NoelStephensUnity deleted the test/default-multiInstance-testrunner-scene-validation branch September 9, 2021 13:57
SamuelBellomo added a commit that referenced this pull request Sep 13, 2021
…nsform

* develop:
  fix: add `link.xml` to prevent IL2CPP stripping `Unity.PerformanceTesting` (#1172)
  chore: add boilerplate for `ClientNetworkTransform` sample (#1168)
  chore: remove `ClientNetworkVariable` (#1167)
  chore: Disable test while we reevaluate the assumption that INetworkM… (#1163)
  docs: rename Manual.md to Index.md
  Only track one metric for scene sync and do not report scene name (#1159)
  test: create job definitions for mobile build and test (#1152)
  test: make test runner scene ignored by default for BaseMultiInstanceTest (#1154)
  fix: remove left-over reference to SyncTransform (#1155)
  chore: remove unused SyncTransform.cs (#1153)
  chore!: remove NetworkNavMeshAgent (#1150)
  fix: NetworkObject parenting support in scene transitioning (#1148)
  chore!: rename Prototyping asmdef to Components (#1145)
  feat: add bootstrap sample to package (#1140)
  chore: remove `--yamato` param from `standards.py` (#1144)
  fix: MTT-504 connection approval messages and comparing networkconfig (#1138)
  refactor!: remove NetworkChannel and MultiplexTransportAdapter (#1133)

# Conflicts:
#	com.unity.netcode.gameobjects/Components/Interpolator.meta
#	com.unity.netcode.gameobjects/Components/Interpolator/BufferedLinearInterpolator.cs
#	com.unity.netcode.gameobjects/Components/Interpolator/BufferedLinearInterpolator.cs.meta
#	testproject/Assets/Prefabs/PlayerCube.prefab
mollstam pushed a commit to Keepsake-Games/com.unity.netcode.gameobjects that referenced this pull request Feb 13, 2023
…Test (Unity-Technologies#1154)

* refactor

Specific to testing, this adds the ability to ignore the warning message when scene validation fails so we don't spam log.

* refactor

If not already set, making the test runner scene a default scene for clients to not try to synchronize.  This also will register the test runner scene so that other associated warning messages will not log-spam.

* refactor

This update allows one to add an additional start initialization action to be invoked when just after the server-host is started and after each client is started for scenarios where you need to access sub-systems that are only initialized when the NetworkManager is started (client, host, or server).

Made minor modifications to the BaseMultiInstanceTest to reflect the above changes.

* style

included 1 whitespace

* style

updated comment and removed a LF

* style

updated comment.

* refactor

updated comment.
using startInitializationCallback?.Invoke(server); as opposed to checking for null.
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