Commit e0e0098
authored
fix: integration tests and NetworkTransform teleport issue (#2451)
* Test Updates and Fixes
Adding UNITY_INCLUDE_TESTS define checks for integration tests
Some modifications to reduce the over-all NetworkTransform test times.
Reducing NetworkAnimator tests time.
Making sure NetworkAnimatorTests.ShutdownWhileSpawnedAndStartBackUpTest fails if the client cannot reconnect after shutting down.
Improving the nested network transform test accuracy and assuring that we are actually comparing against the authority's pushed position and not comparing values in-between ticks.
Making sure all clients are disconnected before shutting down server in NetworkAnimator (trying to see if I can get it more stable on Mac 2020.3)
This update provides a new TimeOutHelper derived class TimeoutFrameCountHelper that requires the expected number of frames to pass and the time out period to be reached before it considers the condition check timed out.
Making 2020.3 Mac OS X runs use a higher threshold as it fails on full precision when interpolation is enabled.
Making the test component for TransformInterpolationObject derive from NetworkTransform to assure that we are checking values after they have been updated.
Updated TransformInterpolationTest to be based on frames and not time.
Making adjustments for systems that run below (or well below) the expected frame rate.
Adding some additional checks as well as providing additional information about time and frame count in NestedNetworkTransformTests.
* fix
Fixing some tests and NetworkTranaform teleporting issue where some deltas could be lost in-between ticks.
Fixing an issue with the network config hash internally stored value not clearing when the server-host or the client shutsdown in the event that prefabs change depending upon the network session being connected to.1 parent 5de83b3 commit e0e0098
12 files changed
Lines changed: 508 additions & 145 deletions
File tree
- com.unity.netcode.gameobjects
- Components
- Runtime
- Configuration
- Core
- TestHelpers/Runtime
- Tests
- Editor
- Runtime
- NetworkTransform
- Timing
- testproject/Assets/Tests
- Manual/Scripts
- Runtime
- Animation
- NetworkTransform
Lines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1178 | 1178 | | |
1179 | 1179 | | |
1180 | 1180 | | |
1181 | | - | |
| 1181 | + | |
1182 | 1182 | | |
1183 | 1183 | | |
1184 | 1184 | | |
| |||
1366 | 1366 | | |
1367 | 1367 | | |
1368 | 1368 | | |
| 1369 | + | |
| 1370 | + | |
1369 | 1371 | | |
1370 | 1372 | | |
1371 | 1373 | | |
| |||
1424 | 1426 | | |
1425 | 1427 | | |
1426 | 1428 | | |
| 1429 | + | |
1427 | 1430 | | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
1431 | 1434 | | |
1432 | 1435 | | |
1433 | 1436 | | |
| |||
2346 | 2349 | | |
2347 | 2350 | | |
2348 | 2351 | | |
2349 | | - | |
| 2352 | + | |
2350 | 2353 | | |
2351 | 2354 | | |
2352 | 2355 | | |
| |||
2397 | 2400 | | |
2398 | 2401 | | |
2399 | 2402 | | |
2400 | | - | |
2401 | | - | |
2402 | | - | |
2403 | | - | |
2404 | 2403 | | |
2405 | 2404 | | |
2406 | 2405 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
211 | 219 | | |
212 | 220 | | |
213 | 221 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1325 | 1329 | | |
1326 | 1330 | | |
1327 | 1331 | | |
| |||
Lines changed: 106 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
19 | 39 | | |
20 | 40 | | |
| 41 | + | |
| 42 | + | |
21 | 43 | | |
22 | 44 | | |
23 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
24 | 51 | | |
25 | 52 | | |
26 | 53 | | |
27 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
28 | 59 | | |
29 | 60 | | |
| 61 | + | |
30 | 62 | | |
31 | 63 | | |
32 | | - | |
| 64 | + | |
33 | 65 | | |
34 | 66 | | |
35 | 67 | | |
36 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
37 | 74 | | |
38 | 75 | | |
39 | 76 | | |
40 | 77 | | |
41 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
42 | 145 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
| |||
333 | 335 | | |
334 | 336 | | |
335 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
336 | 345 | | |
337 | 346 | | |
338 | 347 | | |
| |||
358 | 367 | | |
359 | 368 | | |
360 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
361 | 377 | | |
362 | 378 | | |
363 | 379 | | |
| |||
383 | 399 | | |
384 | 400 | | |
385 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
386 | 409 | | |
387 | 410 | | |
388 | 411 | | |
| |||
407 | 430 | | |
408 | 431 | | |
409 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
410 | 441 | | |
411 | 442 | | |
412 | 443 | | |
| |||
431 | 462 | | |
432 | 463 | | |
433 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
434 | 473 | | |
435 | 474 | | |
436 | 475 | | |
| |||
456 | 495 | | |
457 | 496 | | |
458 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
459 | 505 | | |
460 | 506 | | |
461 | 507 | | |
| |||
480 | 526 | | |
481 | 527 | | |
482 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
483 | 537 | | |
484 | 538 | | |
485 | 539 | | |
| |||
504 | 558 | | |
505 | 559 | | |
506 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
507 | 569 | | |
508 | 570 | | |
509 | 571 | | |
| |||
0 commit comments