Commit 73ac141
authored
fix: NetworkManager ApprovalTimeout should not depend upon client synchronization (#2261)
* fix
This fix separates the IsConnectedClient from the approval process by adding an IsApproved flag.
This also has a fix to prevent the domain backup error during serialization.
* test
Added the ability to bypass the entire NetcodeIntegrationTest connection approval process after the server and clients have been started. This allows us to now use NetcodeIntegrationTest for unique connection oriented tests without being bound to the asserts if not all clients connected properly.
Refactored for ConnectionApprovalTimeoutTests to use the added m_BypassConnectionTimeout to bypass the waiting for clients to connect. It still uses the message hook catch technique to simulate the timeout scenarios where either a server detects a transport connection but never receives a connection request or a client sends the connection request but never receives approval for the connection.1 parent 01d7ed7 commit 73ac141
File tree
6 files changed
+176
-116
lines changed- com.unity.netcode.gameobjects
- Components
- Runtime
- Core
- Messaging/Messages
- TestHelpers/Runtime
- Tests/Runtime
6 files changed
+176
-116
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
10 | 23 | | |
11 | 24 | | |
12 | 25 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
| |||
Lines changed: 67 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
| 370 | + | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
373 | 385 | | |
374 | 386 | | |
375 | 387 | | |
| |||
877 | 889 | | |
878 | 890 | | |
879 | 891 | | |
| 892 | + | |
| 893 | + | |
880 | 894 | | |
881 | 895 | | |
882 | 896 | | |
| |||
1018 | 1032 | | |
1019 | 1033 | | |
1020 | 1034 | | |
1021 | | - | |
1022 | 1035 | | |
1023 | 1036 | | |
1024 | 1037 | | |
| |||
1031 | 1044 | | |
1032 | 1045 | | |
1033 | 1046 | | |
| 1047 | + | |
1034 | 1048 | | |
1035 | 1049 | | |
1036 | 1050 | | |
| |||
1152 | 1166 | | |
1153 | 1167 | | |
1154 | 1168 | | |
| 1169 | + | |
1155 | 1170 | | |
1156 | 1171 | | |
1157 | 1172 | | |
| |||
1413 | 1428 | | |
1414 | 1429 | | |
1415 | 1430 | | |
| 1431 | + | |
1416 | 1432 | | |
1417 | 1433 | | |
1418 | 1434 | | |
| |||
1649 | 1665 | | |
1650 | 1666 | | |
1651 | 1667 | | |
1652 | | - | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
1653 | 1675 | | |
1654 | | - | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
1655 | 1679 | | |
1656 | | - | |
1657 | | - | |
| 1680 | + | |
1658 | 1681 | | |
1659 | | - | |
1660 | | - | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
1661 | 1685 | | |
1662 | | - | |
1663 | | - | |
1664 | | - | |
| 1686 | + | |
| 1687 | + | |
1665 | 1688 | | |
1666 | | - | |
1667 | | - | |
| 1689 | + | |
1668 | 1690 | | |
1669 | | - | |
1670 | | - | |
1671 | | - | |
1672 | | - | |
1673 | | - | |
1674 | | - | |
1675 | | - | |
| 1691 | + | |
1676 | 1692 | | |
1677 | 1693 | | |
1678 | | - | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
1679 | 1697 | | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
| 1698 | + | |
| 1699 | + | |
1686 | 1700 | | |
1687 | | - | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
1688 | 1706 | | |
1689 | | - | |
1690 | | - | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
1691 | 1725 | | |
1692 | 1726 | | |
1693 | | - | |
| 1727 | + | |
1694 | 1728 | | |
1695 | | - | |
| 1729 | + | |
1696 | 1730 | | |
1697 | | - | |
1698 | | - | |
| 1731 | + | |
1699 | 1732 | | |
1700 | | - | |
1701 | | - | |
1702 | | - | |
1703 | | - | |
1704 | | - | |
1705 | 1733 | | |
1706 | 1734 | | |
1707 | 1735 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
Lines changed: 34 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
134 | 146 | | |
135 | 147 | | |
136 | 148 | | |
| |||
455 | 467 | | |
456 | 468 | | |
457 | 469 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
| 470 | + | |
| 471 | + | |
463 | 472 | | |
464 | | - | |
465 | | - | |
466 | | - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
467 | 479 | | |
468 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
469 | 483 | | |
470 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
471 | 489 | | |
472 | | - | |
473 | 490 | | |
474 | | - | |
475 | 491 | | |
476 | | - | |
| 492 | + | |
477 | 493 | | |
478 | | - | |
479 | | - | |
480 | | - | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
481 | 497 | | |
482 | | - | |
| 498 | + | |
| 499 | + | |
483 | 500 | | |
484 | 501 | | |
485 | 502 | | |
| |||
0 commit comments