Skip to content

test: connection approval and invalid NetworkPrefabs within NetworkConfig.NetworkPrefabs #825

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

Adding a connection approval handler non-multi-NetworkManager unit test.
Added a regression test for PR-818.

Adding a connection approval handler non-multi-NetworkManager unit test.
Adding a regression test for PR-818.
Just removing the exception within the try catch as it isn't needed for this test.
Fixing issue with calling StartHost twice.
one more tweak to assure the NetworkPrefabHandler test has a valid NetworkManager instance.
public void Setup()
{
// Create, instantiate, and host
Assert.IsTrue(NetworkManagerHelper.StartNetworkManager(out _,NetworkManagerHelper.NetworkManagerOperatingMode.None));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NoelStephensUnity @TwoTenPvP I like these helpers to simplify unit tests, but I think we may now have 2 sets of helpers. Is this right? Can we merge them into one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good idea.

m_IsValidated = false;
NetworkManagerHelper.NetworkManagerObject.StartHost();

var timeOut = Time.realtimeSinceStartup + 3.0f;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these 3.0 & 0.01 time values have a rationale to them and are compatible with how things operate on Yamato?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep... it was a "wild guess" of what to realistically expect Yamato's read/write times when under a heavy load (worst case scenario)...so far it seems to be working out ok... :)

@NoelStephensUnity NoelStephensUnity merged commit 1808ea0 into develop May 11, 2021
@NoelStephensUnity NoelStephensUnity deleted the test/ConnectionAproval_and_InvalidNetworkPrefabsDuringInit branch May 11, 2021 01:09
SamuelBellomo added a commit that referenced this pull request May 13, 2021
* develop:
  refactor: Minor updates for unique editor unit tests with updated comments (#801)
  test: Added MultiInstanceHelper for multi-instance runtime tests (#817)
  test: connection approval and invalid NetworkPrefabs within NetworkConfig.NetworkPrefabs (#825)
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.

2 participants