mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
MirrorTest: TearDown shuts down NetworkClient/Server too
This commit is contained in:
parent
3d535e0c4e
commit
7a7ea26cc9
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -29,9 +29,6 @@ public override void SetUp()
|
||||
public override void TearDown()
|
||||
{
|
||||
connectionToServer.Disconnect();
|
||||
NetworkClient.Shutdown();
|
||||
NetworkServer.Shutdown();
|
||||
|
||||
base.TearDown();
|
||||
}
|
||||
|
||||
|
@ -195,9 +195,6 @@ public class NetworkBehaviourTests : MirrorEditModeTest
|
||||
public override void TearDown()
|
||||
{
|
||||
NetworkServer.RemoveLocalConnection();
|
||||
NetworkClient.Shutdown();
|
||||
NetworkServer.Shutdown();
|
||||
|
||||
NetworkIdentity.spawned.Clear();
|
||||
base.TearDown();
|
||||
}
|
||||
|
@ -16,8 +16,6 @@ public override void SetUp()
|
||||
[TearDown]
|
||||
public override void TearDown()
|
||||
{
|
||||
NetworkServer.Shutdown();
|
||||
NetworkClient.Shutdown();
|
||||
base.TearDown();
|
||||
}
|
||||
|
||||
|
@ -265,8 +265,6 @@ public void OnDestroy()
|
||||
public override void TearDown()
|
||||
{
|
||||
// cleanup
|
||||
NetworkClient.Shutdown();
|
||||
NetworkServer.Shutdown();
|
||||
NetworkIdentity.spawned.Clear();
|
||||
|
||||
base.TearDown();
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,6 @@ public override void TearDown()
|
||||
{
|
||||
// stop server/client
|
||||
NetworkClient.Disconnect();
|
||||
NetworkClient.Shutdown();
|
||||
NetworkServer.Shutdown();
|
||||
NetworkIdentity.spawned.Clear();
|
||||
base.TearDown();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user