From 8f4834b1d8aef027e3294ee1a15f856488a50351 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sat, 15 Feb 2020 02:33:37 +0100 Subject: [PATCH] Revert "add integration test for serializer" This reverts commit 0e286ad80832fc239b37c9a6a6ad4e3e4c1039b3. --- .../Content.IntegrationTests.csproj | 1 - .../Tests/SerializerTest.cs | 83 ------------------- SpaceStation14.sln | 8 +- 3 files changed, 4 insertions(+), 88 deletions(-) delete mode 100644 Content.IntegrationTests/Tests/SerializerTest.cs diff --git a/Content.IntegrationTests/Content.IntegrationTests.csproj b/Content.IntegrationTests/Content.IntegrationTests.csproj index c117660cee..facf846aee 100644 --- a/Content.IntegrationTests/Content.IntegrationTests.csproj +++ b/Content.IntegrationTests/Content.IntegrationTests.csproj @@ -12,7 +12,6 @@ - diff --git a/Content.IntegrationTests/Tests/SerializerTest.cs b/Content.IntegrationTests/Tests/SerializerTest.cs deleted file mode 100644 index 108bcc92e9..0000000000 --- a/Content.IntegrationTests/Tests/SerializerTest.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Moq; -using NUnit.Framework; -using Robust.Server.Interfaces.GameObjects; -using Robust.Server.Interfaces.Player; -using Robust.Shared.Enums; -using Robust.Shared.GameObjects; -using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Interfaces.Network; -using Robust.Shared.Interfaces.Serialization; -using Robust.Shared.IoC; -using Robust.Shared.Serialization; -using Robust.Shared.Timing; -using Is = NUnit.DeepObjectCompare.Is; - -namespace Content.IntegrationTests.Tests -{ - - public class SerializerTest : ContentIntegrationTest - { - - [Test] - public async Task EntityStatesTest() - { - RobustSerializer._traceWriter = Console.Out; - var client = StartClient(); - var server = StartServer(); - - await Task.WhenAll(client.WaitIdleAsync(), server.WaitIdleAsync()); - - // Connect. - - client.SetConnectTarget(server); - - client.Post(() => IoCManager.Resolve().ClientConnect(null, 0, null)); - - // Run some ticks for the handshake to complete and such. - - server.RunTicks(1); - await server.WaitIdleAsync(); - client.RunTicks(1); - await client.WaitIdleAsync(); - - await Task.WhenAll(client.WaitIdleAsync(), server.WaitIdleAsync()); - - // Basic checks to ensure that they're connected and data got replicated. - - var mtx = new ManualResetEventSlim(); - List es = null; - - server.Post(() => - { - var sem = IoCManager.Resolve(); - es = sem.GetEntityStates(GameTick.Zero); - mtx.Set(); - }); - mtx.Wait(); - - Assert.NotNull(es); - - var serializer = new RobustSerializer(); - - List roundTrip; - - using (var ms = new MemoryStream()) - { - serializer.Serialize(ms, es); - ms.Position = 0; - roundTrip = (List)serializer.Deserialize(ms); - } - - Assert.That(roundTrip, Is.DeepEqualTo(es)); - - } - - } - -} diff --git a/SpaceStation14.sln b/SpaceStation14.sln index 7bde6a2e58..5f39c0fd76 100644 --- a/SpaceStation14.sln +++ b/SpaceStation14.sln @@ -115,10 +115,10 @@ Global {4809F412-3132-419E-BF9D-CCF7593C3533}.Debug|x64.Build.0 = Debug|x64 {4809F412-3132-419E-BF9D-CCF7593C3533}.Release|x64.ActiveCfg = Release|x64 {4809F412-3132-419E-BF9D-CCF7593C3533}.Release|x64.Build.0 = Release|x64 - {45C9B43F-305D-4651-9863-F6384CBC847F}.Debug|x64.ActiveCfg = Debug|x64 - {45C9B43F-305D-4651-9863-F6384CBC847F}.Debug|x64.Build.0 = Debug|x64 - {45C9B43F-305D-4651-9863-F6384CBC847F}.Release|x64.ActiveCfg = Release|x64 - {45C9B43F-305D-4651-9863-F6384CBC847F}.Release|x64.Build.0 = Release|x64 + {45C9B43F-305D-4651-9863-F6384CBC847F}.Debug|x64.ActiveCfg = Debug|Any CPU + {45C9B43F-305D-4651-9863-F6384CBC847F}.Debug|x64.Build.0 = Debug|Any CPU + {45C9B43F-305D-4651-9863-F6384CBC847F}.Release|x64.ActiveCfg = Release|Any CPU + {45C9B43F-305D-4651-9863-F6384CBC847F}.Release|x64.Build.0 = Release|Any CPU {A3A97D48-6128-4330-B962-B4A96F018CE8}.Debug|x64.ActiveCfg = Debug|Any CPU {A3A97D48-6128-4330-B962-B4A96F018CE8}.Debug|x64.Build.0 = Debug|Any CPU {A3A97D48-6128-4330-B962-B4A96F018CE8}.Release|x64.ActiveCfg = Release|Any CPU