diff --git a/Assets/Mirror/Tests/Common/ClientSceneTestsBase.cs b/Assets/Mirror/Tests/Common/ClientSceneTestsBase.cs index 5b1012c8e..2d4a1634e 100644 --- a/Assets/Mirror/Tests/Common/ClientSceneTestsBase.cs +++ b/Assets/Mirror/Tests/Common/ClientSceneTestsBase.cs @@ -45,7 +45,6 @@ public void OneTimeSetUp() [TearDown] public override void TearDown() { - NetworkClient.Shutdown(); // reset asset id in case they are changed by tests validPrefabNetworkIdentity.assetId = validPrefabGuid; diff --git a/Assets/Mirror/Tests/Common/MirrorTest.cs b/Assets/Mirror/Tests/Common/MirrorTest.cs index 2d1ce5aed..5d5ff729f 100644 --- a/Assets/Mirror/Tests/Common/MirrorTest.cs +++ b/Assets/Mirror/Tests/Common/MirrorTest.cs @@ -26,6 +26,9 @@ public virtual void SetUp() public virtual void TearDown() { + NetworkClient.Shutdown(); + NetworkServer.Shutdown(); + foreach (GameObject go in instantiated) if (go != null) GameObject.DestroyImmediate(go); diff --git a/Assets/Mirror/Tests/Editor/LocalConnectionTest.cs b/Assets/Mirror/Tests/Editor/LocalConnectionTest.cs index 2d1e1744c..4b6735d02 100644 --- a/Assets/Mirror/Tests/Editor/LocalConnectionTest.cs +++ b/Assets/Mirror/Tests/Editor/LocalConnectionTest.cs @@ -29,9 +29,6 @@ public override void SetUp() public override void TearDown() { connectionToServer.Disconnect(); - NetworkClient.Shutdown(); - NetworkServer.Shutdown(); - base.TearDown(); } diff --git a/Assets/Mirror/Tests/Editor/NetworkBehaviourTests.cs b/Assets/Mirror/Tests/Editor/NetworkBehaviourTests.cs index f083826a4..a205da330 100644 --- a/Assets/Mirror/Tests/Editor/NetworkBehaviourTests.cs +++ b/Assets/Mirror/Tests/Editor/NetworkBehaviourTests.cs @@ -195,9 +195,6 @@ public class NetworkBehaviourTests : MirrorEditModeTest public override void TearDown() { NetworkServer.RemoveLocalConnection(); - NetworkClient.Shutdown(); - NetworkServer.Shutdown(); - NetworkIdentity.spawned.Clear(); base.TearDown(); } diff --git a/Assets/Mirror/Tests/Editor/NetworkClientTests.cs b/Assets/Mirror/Tests/Editor/NetworkClientTests.cs index 97788f406..3b982636f 100644 --- a/Assets/Mirror/Tests/Editor/NetworkClientTests.cs +++ b/Assets/Mirror/Tests/Editor/NetworkClientTests.cs @@ -16,8 +16,6 @@ public override void SetUp() [TearDown] public override void TearDown() { - NetworkServer.Shutdown(); - NetworkClient.Shutdown(); base.TearDown(); } diff --git a/Assets/Mirror/Tests/Editor/NetworkIdentityTests.cs b/Assets/Mirror/Tests/Editor/NetworkIdentityTests.cs index b0d251714..157af0777 100644 --- a/Assets/Mirror/Tests/Editor/NetworkIdentityTests.cs +++ b/Assets/Mirror/Tests/Editor/NetworkIdentityTests.cs @@ -265,8 +265,6 @@ public void OnDestroy() public override void TearDown() { // cleanup - NetworkClient.Shutdown(); - NetworkServer.Shutdown(); NetworkIdentity.spawned.Clear(); base.TearDown(); diff --git a/Assets/Mirror/Tests/Editor/NetworkServerTest.cs b/Assets/Mirror/Tests/Editor/NetworkServerTest.cs index 9c8bb6d98..0d1af28dd 100644 --- a/Assets/Mirror/Tests/Editor/NetworkServerTest.cs +++ b/Assets/Mirror/Tests/Editor/NetworkServerTest.cs @@ -93,8 +93,6 @@ public override void TearDown() // reset all state // shutdown should be called before setting activeTransport to null NetworkIdentity.spawned.Clear(); - NetworkClient.Shutdown(); - NetworkServer.Shutdown(); base.TearDown(); } diff --git a/Assets/Mirror/Tests/Editor/RemoteTestBase.cs b/Assets/Mirror/Tests/Editor/RemoteTestBase.cs index 8b49b78b2..e7721c814 100644 --- a/Assets/Mirror/Tests/Editor/RemoteTestBase.cs +++ b/Assets/Mirror/Tests/Editor/RemoteTestBase.cs @@ -23,8 +23,6 @@ public override void TearDown() { // stop server/client NetworkClient.Disconnect(); - NetworkClient.Shutdown(); - NetworkServer.Shutdown(); NetworkIdentity.spawned.Clear(); base.TearDown(); }