Commit 8770f9d
fix: SceneEventProgress was triggering twice when running a host and no clients were connected (#2292)
* fix
Exclude the host-client from being processed as one of the clients to test for when the scene event has completed.
GetClientsWithStatus needed to add the host-client to the list of clients that completed once the scene event was completed. Also fixed a bug in GetClientsWithStatus where, when checking for clients that did not complete, it would include the clients that completed and the clients that did not complete in the list of client identifiers it returned.
Fixing issue where integration tests could lag by more than 1 network tick and the AsyncOperation could not yet be assigned.
* test
Added HostReceivesOneLoadEventCompletedNotification integration test to validate the fix for this PR.
Updated NetcodeIntegrationTest virtual methods to be able to gain access to a newly created client (via NetcodeIntegrationTest.CreateAndStartNewClient) when it is first created, started, and when it has been connected.
The updates to SceneEventProgress exposed an issue with ClientSynchronizationValidationTest. It was written before many NetcodeIntegrationTest helpers, so there are adjustments here to leverage from those which greatly simplifies the test.
Switched the scene that was not validated by the client-side to one that did not contain an in-scene placed NetworkObject.
Co-authored-by: Unity Netcode CI <74025435+netcode-ci-service@users.noreply.github.com>1 parent 59a973c commit 8770f9d
File tree
5 files changed
+134
-67
lines changed- com.unity.netcode.gameobjects
- Runtime/SceneManagement
- TestHelpers/Runtime
- testproject/Assets/Tests/Runtime/NetworkSceneManager
5 files changed
+134
-67
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 35 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | | - | |
| 117 | + | |
116 | 118 | | |
117 | | - | |
118 | 119 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
123 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
124 | 142 | | |
125 | 143 | | |
126 | 144 | | |
| |||
138 | 156 | | |
139 | 157 | | |
140 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
141 | 164 | | |
142 | 165 | | |
143 | 166 | | |
| |||
218 | 241 | | |
219 | 242 | | |
220 | 243 | | |
221 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
222 | 248 | | |
223 | 249 | | |
224 | 250 | | |
| |||
Lines changed: 40 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | 277 | | |
288 | 278 | | |
289 | 279 | | |
| |||
299 | 289 | | |
300 | 290 | | |
301 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
302 | 323 | | |
303 | 324 | | |
304 | 325 | | |
| |||
309 | 330 | | |
310 | 331 | | |
311 | 332 | | |
| 333 | + | |
312 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
313 | 338 | | |
314 | 339 | | |
| 340 | + | |
| 341 | + | |
315 | 342 | | |
316 | 343 | | |
317 | 344 | | |
| |||
322 | 349 | | |
323 | 350 | | |
324 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
325 | 355 | | |
326 | 356 | | |
327 | 357 | | |
| |||
Lines changed: 22 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
| 17 | + | |
21 | 18 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 19 | + | |
26 | 20 | | |
27 | | - | |
| 21 | + | |
28 | 22 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 23 | + | |
| 24 | + | |
35 | 25 | | |
36 | 26 | | |
37 | 27 | | |
38 | 28 | | |
39 | 29 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 30 | + | |
57 | 31 | | |
58 | 32 | | |
59 | 33 | | |
| |||
65 | 39 | | |
66 | 40 | | |
67 | 41 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 42 | + | |
74 | 43 | | |
75 | | - | |
76 | | - | |
| 44 | + | |
| 45 | + | |
77 | 46 | | |
78 | 47 | | |
79 | 48 | | |
| |||
110 | 79 | | |
111 | 80 | | |
112 | 81 | | |
113 | | - | |
114 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
115 | 89 | | |
116 | 90 | | |
117 | 91 | | |
118 | 92 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
122 | 96 | | |
123 | 97 | | |
124 | 98 | | |
| |||
139 | 113 | | |
140 | 114 | | |
141 | 115 | | |
142 | | - | |
| 116 | + | |
143 | 117 | | |
144 | 118 | | |
145 | 119 | | |
| |||
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
137 | 173 | | |
138 | 174 | | |
0 commit comments