Skip to content

Commit b338c5f

Browse files
authored
Merge branch 'develop' into feat/add-builtin-pose-serialization
2 parents ef16557 + 83f641b commit b338c5f

File tree

3 files changed

+48
-14
lines changed

3 files changed

+48
-14
lines changed

.yamato/_triggers.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,23 @@
4343
# Since standards job is a part of initial checks it's not present as direct dependency here
4444
pull_request_trigger:
4545
name: Pull Request Trigger (develop, develop-2.0.0, & release branches)
46+
# Run the following tests on a selection of different desktop platforms
4647
dependencies:
47-
# Run package EditMode and Playmode package tests on trunk
48-
- .yamato/_run-all.yml#run_all_package_tests_trunk
49-
# Run package EditMode and Playmode package tests on minimum supported editor (2021.3 in case of NGOv1.X)
50-
- .yamato/_run-all.yml#run_all_package_tests_2021
51-
# Run project EditMode and PLaymode project tests on trunk
52-
- .yamato/_run-all.yml#run_all_project_tests_trunk
53-
# Run project EditMode and PLaymode project tests on minimum supported editor (2021.3 in case of NGOv1.X)
54-
- .yamato/_run-all.yml#run_all_project_tests_2021
48+
# Run package EditMode and Playmode package tests on trunk and an older supported editor (2022.3) (2022.3 will soon be a minimum supported editor)
49+
- .yamato/package-tests.yml#package_test_-_ngo_trunk_mac
50+
- .yamato/package-tests.yml#package_test_-_ngo_2022.3_win
51+
52+
# Run testproject EditMode and Playmode project tests on trunk and an older supported editor (2022.3) (2022.3 will soon be a minimum supported editor)
53+
- .yamato/project-tests.yml#test_testproject_win_trunk
54+
- .yamato/project-tests.yml#test_testproject_mac_2022.3
55+
56+
# Run tools integration tests EditMode and Playmode tests on trunk and an older supported editor (2022.3) (2022.3 will soon be a minimum supported editor)
57+
- .yamato/project-tests.yml#test_testproject-tools-integration_ubuntu_2022.3
58+
- .yamato/project-tests.yml#test_testproject-tools-integration_win_trunk
59+
5560
# Run standalone test. We run it only on Ubuntu since it's the fastest machine, and it was noted that for example distribution on macOS is taking 40m since we switched to Apple Silicon
5661
# Coverage on other standalone machines is present in Nightly job so it's enough to not run all of them for PRs
57-
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_ubuntu_il2cpp_2021.3
62+
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_ubuntu_il2cpp_2022.3
5863
triggers:
5964
cancel_old_ci: true
6065
pull_requests:
@@ -64,7 +69,7 @@ pull_request_trigger:
6469
- "develop-2.0.0"
6570
- "/release\/.*/"
6671
- drafts: false
67-
72+
6873

6974
# Run all tests on trunk on nightly basis.
7075
# Same subset as pull_request_trigger with addition of mobile/desktop/console tests and webgl builds
@@ -85,7 +90,7 @@ develop_nightly:
8590
# Run package EditMode and Playmode tests on desktop platforms on trunk and 2021.3
8691
- .yamato/_run-all.yml#run_all_package_tests_trunk
8792
- .yamato/_run-all.yml#run_all_package_tests_2021
88-
# Run project EditMode and PLaymode tests on desktop platforms on trunk and 2021.3
93+
# Run project EditMode and PLaymode tests on desktop platforms on trunk and 2021.3
8994
- .yamato/_run-all.yml#run_all_project_tests_trunk
9095
- .yamato/_run-all.yml#run_all_project_tests_2021
9196
# Run Runtime tests on desktop players on trunk and 2021 editors
@@ -132,4 +137,4 @@ develop_weekly_trunk:
132137
# Build player for webgl platform on trunk
133138
- .yamato/_run-all.yml#run_all_webgl_builds
134139
# Run code coverage test
135-
- .yamato/code-coverage.yml#code_coverage_ubuntu_trunk
140+
- .yamato/code-coverage.yml#code_coverage_ubuntu_trunk

.yamato/project.metafile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ validation_editors:
159159
- 2022.3
160160
- 6000.0
161161
- 6000.1
162+
- 6000.2
162163
- trunk
163164

164165

com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/PlayerSpawnObjectVisibilityTests.cs

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace Unity.Netcode.RuntimeTests
1313
internal class PlayerSpawnObjectVisibilityTests : NetcodeIntegrationTest
1414
{
1515
protected override int NumberOfClients => 0;
16-
1716
public enum PlayerSpawnStages
1817
{
1918
OnNetworkSpawn,
@@ -63,6 +62,25 @@ protected override void OnCreatePlayerPrefab()
6362
base.OnCreatePlayerPrefab();
6463
}
6564

65+
/// <summary>
66+
/// Bypassing this on v1.x as the deferred show message could be processed on the next
67+
/// frame from when the client registers having connected.
68+
/// </summary>
69+
protected override bool ShouldWaitForNewClientToConnect(NetworkManager networkManager)
70+
{
71+
return false;
72+
}
73+
74+
/// <summary>
75+
/// Validate that the player object is spawned on the client side.
76+
/// </summary>
77+
/// <returns></returns>
78+
private bool ClientSpawnedPlayer()
79+
{
80+
var playerObject = m_ClientNetworkManagers[0].LocalClient.PlayerObject;
81+
return playerObject != null && playerObject.IsSpawned && playerObject.IsOwner;
82+
}
83+
6684
/// <summary>
6785
/// Tests the scenario where under a client-server network topology if a player prefab
6886
/// is spawned by the server with no observers but the player prefab itself has server
@@ -81,7 +99,17 @@ public IEnumerator NetworkShowOnSpawnTest([Values] PlayerSpawnStages spawnStage)
8199

82100
yield return CreateAndStartNewClient();
83101

84-
yield return new WaitForSeconds(0.25f);
102+
// Wait for the new client to connect
103+
yield return WaitForClientsConnectedOrTimeOut();
104+
AssertOnTimeout($"Timed out waiting for client to connect!");
105+
OnNewClientStartedAndConnected(m_ClientNetworkManagers[0]);
106+
107+
// Wait for the new client to have spawned the player
108+
yield return WaitForConditionOrTimeOut(ClientSpawnedPlayer);
109+
AssertOnTimeout($"Timed out waiting for client to spawn its player object!");
110+
111+
// Provide some time to assure there are no additional attempts to spawn the same instance
112+
yield return new WaitForSeconds(0.5f);
85113

86114
NetcodeLogAssert.LogWasNotReceived(LogType.Warning, new Regex("but it is already in the spawned list!"));
87115
var client = m_ClientNetworkManagers[0];

0 commit comments

Comments
 (0)