Commit 46424d1
authored
fix: NetcodeIntegrationTest updates and fixes (#3437)
## This PR Includes
### Initial setup changes
- Minor improvements to the initial CMB server detection and adjustments
to the initial configuration order of operations.
- Session owner now starts and connects ahead of the other clients.
### Ignoring tests
This PR includes updates that will ignore any test that:
- Uses a client-server network topology
- _No point in re-running these as they will have already run multiple
times on multiple platforms before testing against the CMB server._
- Has overridden UseCmbService and is returning false.
- _The test has yet to be converted and so no point in even attempting
to run it._
- _This also includes the `TODO: [CmbServiceTests]` to help track all
tests that need to be converted or reviewed to determine if they need to
be converted._
- Is not derived from NetcodeIntegrationTest.
- _Many of these (not all) don't need to run again, but they all have
the `TODO: [CmbServiceTests]` to help track all tests that need to be
converted or not._
- Does not need to be tested against the CMB Server (i.e. a test for
some kind of functionality without actually starting a session and the
like).
_(This helps to reduce the time to complete the CMB Server integration
tests)_
### Marking/Tracking "for review" tests
Assuring that every test that needs to be reviewed includes the `TODO:
[CmbServiceTests]` using of the two ways:
For classes that derive from `NetcodeIntegrationTest` the existing
pattern used in #3423 was applied:
```
// TODO: [CmbServiceTests] Adapt to run with the service
protected override bool UseCMBService()
{
return false;
}
```
For classes that **do not** derive from `NetcodeIntegrationTest`, an
added internal helper method was used:
```
[OneTimeSetUp]
public void OneTimeSetup()
{
// TODO: [CmbServiceTests] if this test is deemed needed to test against the CMB server then update this test.
NetcodeIntegrationTestHelpers.IgnoreIfServiceEnviromentVariableSet();
}
```
_(This PR includes some tests that includes one of the two script
segments but was was reviewed and determined it didn't need to be run
against a CMB server)_
## Fixes
Some issues were exposed in regards to the `NetworkClient` not being set
to approved on all clients relative to each local `NetworkManager`
instance when using the distributed authority network topology and
connecting to a CMB server.
## Changelog
NA - All internal testing and/or specific to testing.
## Testing and Documentation
- Includes integration test adjustments.
- Includes `NetcodeIntegrationTest` related adjustments.
- Includes `NetcodeIntegrationTestHelpers` related adjustments.
- No documentation changes or additions were necessary.
## Backport
Does not require a backport since these changes are specific to updates
in #3423 and over-all distributed authority integration testing.1 parent c1f9445 commit 46424d1
File tree
55 files changed
+786
-407
lines changed- com.unity.netcode.gameobjects
- Runtime
- Messaging/Messages
- SceneManagement
- Spawning
- TestHelpers/Runtime
- Tests/Runtime
- DistributedAuthority
- NetworkObject
- NetworkTransform
- NetworkVariable
- Physics
- Prefabs
- Profiling
- Serialization
- Timing
- Transports
- testproject/Assets/Tests/Runtime
- NetworkSceneManager
- NetworkTransform
- ObjectParenting
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
55 files changed
+786
-407
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
277 | 276 | | |
278 | 277 | | |
279 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
| |||
Lines changed: 16 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2595 | 2595 | | |
2596 | 2596 | | |
2597 | 2597 | | |
2598 | | - | |
| 2598 | + | |
| 2599 | + | |
2599 | 2600 | | |
2600 | | - | |
2601 | | - | |
2602 | | - | |
2603 | | - | |
2604 | | - | |
2605 | | - | |
2606 | | - | |
2607 | | - | |
2608 | | - | |
2609 | | - | |
2610 | | - | |
| 2601 | + | |
2611 | 2602 | | |
2612 | | - | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
2613 | 2608 | | |
2614 | | - | |
2615 | | - | |
2616 | | - | |
2617 | | - | |
2618 | | - | |
2619 | | - | |
2620 | | - | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
2621 | 2613 | | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
2622 | 2618 | | |
2623 | 2619 | | |
2624 | 2620 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
| 834 | + | |
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
| |||
0 commit comments