Skip to content

Commit 59cdd30

Browse files
authored
fix: MPSNGM-302 Fix DA integration tests (#2955)
1 parent 2493ff6 commit 59cdd30

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DistributedAuthorityCodecTests.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected override void OnServerAndClientsCreated()
8787
Client.LogLevel = LogLevel.Developer;
8888

8989
// Validate we are in distributed authority mode with client side spawning and using CMB Service
90-
Assert.True(Client.DistributedAuthorityMode, "Distributed authority is not set!");
90+
Assert.True(Client.NetworkConfig.NetworkTopology == NetworkTopologyTypes.DistributedAuthority, "Distributed authority topology is not set!");
9191
Assert.True(Client.AutoSpawnPlayerPrefabClientSide, "Client side spawning is not set!");
9292
Assert.True(Client.CMBServiceConnection, "CMBServiceConnection is not set!");
9393

@@ -101,6 +101,9 @@ protected override void OnServerAndClientsCreated()
101101

102102
protected override IEnumerator OnStartedServerAndClients()
103103
{
104+
// Validate the NetworkManager are in distributed authority mode
105+
Assert.True(Client.DistributedAuthorityMode, "Distributed authority is not set!");
106+
104107
// Register hooks after starting clients and server (in this case just the one client)
105108
// We do this at this point in time because the MessageManager exists (happens within the same call stack when starting NetworkManagers)
106109
m_ClientCodecHook = new CodecTestHooks();

0 commit comments

Comments
 (0)