diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DeferredDespawningTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DeferredDespawningTests.cs index dac15570f7..262d78dd0a 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DeferredDespawningTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DeferredDespawningTests.cs @@ -53,7 +53,9 @@ protected override void OnServerAndClientsCreated() [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator DeferredDespawning() { // Setup for test diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/NetworkClientAndPlayerObjectTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/NetworkClientAndPlayerObjectTests.cs index aabe7522c7..fd0723e111 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/NetworkClientAndPlayerObjectTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/NetworkClientAndPlayerObjectTests.cs @@ -155,7 +155,9 @@ private bool AllNetworkClientsValidated() /// Validates the same thing when a client late joins and when a client disconnects. /// [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149595", "ValidateNetworkClients throws duplicate-key ArgumentException on CoreCLR (DAHost)")] +#if ENABLE_CORECLR + [Explicit("ValidateNetworkClients throws duplicate-key ArgumentException on CoreCLR (DAHost), see https://jira.unity3d.com/browse/UUM-149595")] +#endif public IEnumerator ValidateNetworkClients() { // Validate the initial clients created diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/Configuration/SinglePlayerSessions.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/Configuration/SinglePlayerSessions.cs index 774debccf0..7b46e03916 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/Configuration/SinglePlayerSessions.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/Configuration/SinglePlayerSessions.cs @@ -151,7 +151,9 @@ protected override void OnNewClientCreated(NetworkManager networkManager) } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator SwitchTransportTest() { var authority = GetAuthorityNetworkManager(); diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/NetworkVariable/CustomSerializationDocsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/NetworkVariable/CustomSerializationDocsTests.cs index 69dfae8be8..d56813dd3a 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/NetworkVariable/CustomSerializationDocsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/NetworkVariable/CustomSerializationDocsTests.cs @@ -1,5 +1,6 @@ using System.Collections; using System.Text; +using NUnit.Framework; using Unity.Netcode; using Unity.Netcode.TestHelpers.Runtime; using UnityEngine; @@ -173,7 +174,9 @@ private bool ValidateAllAreEqual(StringBuilder errorLog) } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator TestHealthCode() { var authority = GetAuthorityNetworkManager(); diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs index b943be4883..f0deca9593 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs @@ -94,7 +94,9 @@ protected override void OnNewClientCreated(NetworkManager networkManager) } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public IEnumerator NetworkObjectDeserializationFailure() { m_CurrentLogLevel = LogLevel.Nothing; @@ -278,7 +280,9 @@ private void ValidateNetworkBehaviourWithNetworkVariables(NetworkObject authorit /// will still be initialized properly /// [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public IEnumerator NetworkBehaviourSynchronization() { var authority = GetAuthorityNetworkManager(); @@ -321,7 +325,9 @@ public IEnumerator NetworkBehaviourSynchronization() /// A basic validation for the NetworkBehaviour.OnSynchronize method /// [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public IEnumerator NetworkBehaviourOnSynchronize() { var authority = GetAuthorityNetworkManager(); diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkListTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkListTests.cs index 98bb2e8f74..c310d55781 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkListTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkListTests.cs @@ -244,7 +244,9 @@ void TestForceUpdateCallback(NetworkListEvent _) // don't extend this please [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator LegacyPredicateTesting() { var authority = GetAuthorityNetworkManager(); diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableAnticipationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableAnticipationTests.cs index b5b89d02f1..52f76f04c1 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableAnticipationTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableAnticipationTests.cs @@ -59,7 +59,9 @@ public void SetReanticipateValueRpc(float f) } } - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif internal class NetworkVariableAnticipationTests : NetcodeIntegrationTest { protected override int NumberOfClients => 2; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsChangingTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsChangingTests.cs index 1b61c05bca..cf9e0e103c 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsChangingTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsChangingTests.cs @@ -17,7 +17,9 @@ namespace Unity.Netcode.RuntimeTests [TestFixture(HostOrServer.Host, CollectionTypes.Dictionary)] [TestFixture(HostOrServer.Server, CollectionTypes.List)] [TestFixture(HostOrServer.Server, CollectionTypes.Dictionary)] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif internal class NetworkVariableCollectionsChangingTests : NetcodeIntegrationTest { protected override int NumberOfClients => 2; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs index c4cdf5e3e6..fb3d2a72bb 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs @@ -22,7 +22,9 @@ namespace Unity.Netcode.RuntimeTests /// [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.Server)] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif internal class NetworkVariableCollectionsTests : NetcodeIntegrationTest { protected override int NumberOfClients => 2; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableGeneralTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableGeneralTests.cs index 4623351b7b..8e3e954879 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableGeneralTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableGeneralTests.cs @@ -140,7 +140,9 @@ private bool ChangedValueMatches(StringBuilder errorLog) /// instances invoke . /// [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator ApplyValueDuringSpawnSequence() { var authority = GetAuthorityNetworkManager(); diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariablePermissionTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariablePermissionTests.cs index f1c882685e..90f3f774ed 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariablePermissionTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariablePermissionTests.cs @@ -11,7 +11,9 @@ namespace Unity.Netcode.RuntimeTests { [TestFixtureSource(nameof(TestDataSource))] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif internal class NetworkVariablePermissionTests : NetcodeIntegrationTest { public static IEnumerable TestDataSource() diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTests.cs index 33178e9d27..a8aa926709 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTests.cs @@ -349,7 +349,9 @@ private void InitializeServerAndClients(HostOrServer useHost) /// Runs generalized tests on all predefined NetworkVariable types /// [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void AllNetworkVariableTypes([Values] HostOrServer useHost) { var prefabToSpawn = CreateNetworkObjectPrefab("NetVarTest"); @@ -392,7 +394,9 @@ public void AllNetworkVariableTypes([Values] HostOrServer useHost) } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void ClientWritePermissionTest([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -407,7 +411,9 @@ public void ClientWritePermissionTest([Values] HostOrServer useHost) /// Runs tests that network variables sync on client whatever the local value of . /// [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void NetworkVariableSync_WithDifferentTimeScale([Values] HostOrServer useHost, [Values(0.0f, 1.0f, 2.0f)] float timeScale) { Time.timeScale = timeScale; @@ -422,7 +428,9 @@ public void NetworkVariableSync_WithDifferentTimeScale([Values] HostOrServer use } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void FixedString32Test([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -434,7 +442,9 @@ public void FixedString32Test([Values] HostOrServer useHost) } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestNetworkVariableClass([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -454,7 +464,9 @@ bool VerifyClass() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestNetworkVariableTemplateClass([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -473,7 +485,9 @@ bool VerifyClass() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestNetworkVariableStruct([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -492,7 +506,9 @@ bool VerifyStructure() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestNetworkVariableTemplateStruct([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -511,7 +527,9 @@ bool VerifyStructure() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestNetworkVariableTemplateBehaviourClass([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -534,7 +552,9 @@ bool VerifyClass() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestNetworkVariableTemplateBehaviourClassNotReferencedElsewhere([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -553,7 +573,9 @@ bool VerifyClass() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestNetworkVariableTemplateBehaviourStruct([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -572,7 +594,9 @@ bool VerifyClass() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestNetworkVariableEnum([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -590,7 +614,9 @@ bool VerifyStructure() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestINetworkSerializableClassCallsNetworkSerialize([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -609,7 +635,9 @@ public void TestINetworkSerializableClassCallsNetworkSerialize([Values] HostOrSe } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestINetworkSerializableStructCallsNetworkSerialize([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -624,7 +652,9 @@ public void TestINetworkSerializableStructCallsNetworkSerialize([Values] HostOrS } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void TestCustomGenericSerialization() { // Just verifies that the ILPP codegen initialized these values for this type. @@ -678,7 +708,9 @@ public void TestUnsupportedManagedTypesThrowExceptions() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void TestUnsupportedManagedTypesWithUserSerializationDoNotThrowExceptions() { var variable = new NetworkVariable(); @@ -734,7 +766,9 @@ public void TestUnsupportedUnmanagedTypesThrowExceptions() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void TestTypesReferencedInSubclassSerializeSuccessfully() { var variable = new NetworkVariableSubclass>(); @@ -750,7 +784,9 @@ public void TestTypesReferencedInSubclassSerializeSuccessfully() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void TestUnsupportedUnmanagedTypesWithUserSerializationDoNotThrowExceptions() { var variable = new NetworkVariable(); @@ -824,7 +860,9 @@ public void WhenCreatingAnArrayOfNetVars_InitializingVariablesDoesNotThrowAnExce } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public void TestNetworkVariableChangeAndReturnInSameFrame([Values] HostOrServer useHost) { InitializeServerAndClients(useHost); @@ -1382,7 +1420,9 @@ private void TestValueTypeNativeHashMap(NativeHashMap te } #endif [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void WhenSerializingAndDeserializingValueTypeNetworkVariables_ValuesAreSerializedCorrectly( [Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), @@ -1550,7 +1590,9 @@ public void WhenSerializingAndDeserializingValueTypeNetworkVariables_ValuesAreSe } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void WhenSerializingAndDeserializingValueTypeNativeArrayNetworkVariables_ValuesAreSerializedCorrectly( [Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), @@ -1894,7 +1936,9 @@ public string ArrayStr(NativeArray arr) where T : unmanaged [Test] [UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Ignored test tracked in MTT-11343 [Repeat(5)] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void WhenSerializingAndDeserializingVeryLargeValueTypeNativeArrayNetworkVariables_ValuesAreSerializedCorrectly( [Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), @@ -2357,7 +2401,9 @@ public string DictionaryStr(Dictionary list) [Test] [UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Ignored test tracked in MTT-11343 [Repeat(5)] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void WhenSerializingAndDeserializingVeryLargeListNetworkVariables_ValuesAreSerializedCorrectly( [Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), @@ -2553,7 +2599,9 @@ public void WhenSerializingAndDeserializingVeryLargeListNetworkVariables_ValuesA [Test] [UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Ignored test tracked in MTT-11343 [Repeat(5)] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void WhenSerializingAndDeserializingVeryLargeHashSetNetworkVariables_ValuesAreSerializedCorrectly( [Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), @@ -2718,7 +2766,9 @@ public void WhenSerializingAndDeserializingVeryLargeHashSetNetworkVariables_Valu [Test] [UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Ignored test tracked in MTT-11343 [Repeat(5)] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void WhenSerializingAndDeserializingVeryLargeDictionaryNetworkVariables_ValuesAreSerializedCorrectly( [Values(typeof(byte), typeof(ulong), typeof(Vector2), typeof(HashMapKeyClass))] Type keyType, @@ -4835,7 +4885,9 @@ public void WhenSerializingAndDeserializingVeryLargeValueTypeNativeHashMapNetwor #endif [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void TestManagedINetworkSerializableNetworkVariablesDeserializeInPlace() { var variable = new NetworkVariable @@ -4872,7 +4924,9 @@ public void TestManagedINetworkSerializableNetworkVariablesDeserializeInPlace() } [Test] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public void TestUnmnagedINetworkSerializableNetworkVariablesDeserializeInPlace() { var variable = new NetworkVariable diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTraitsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTraitsTests.cs index 45a66c6670..0672b50077 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTraitsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTraitsTests.cs @@ -15,7 +15,9 @@ internal class NetworkVariableTraitsComponent : NetworkBehaviour [TestFixture(HostOrServer.Host)] [TestFixture(HostOrServer.DAHost)] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif internal class NetworkVariableTraitsTests : NetcodeIntegrationTest { protected override int NumberOfClients => 3; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableUserSerializableTypesTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableUserSerializableTypesTests.cs index cf9021f463..2b5700d3b8 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableUserSerializableTypesTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableUserSerializableTypesTests.cs @@ -142,7 +142,9 @@ private bool CheckForClientInstance() where T : WorkingUserNetworkVariableCom } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator WhenUsingAUserSerializableNetworkVariableWithUserSerialization_ReplicationWorks() { UserNetworkVariableSerialization.WriteValue = (FastBufferWriter writer, in MyTypeOne value) => @@ -183,7 +185,9 @@ public IEnumerator WhenUsingAUserSerializableNetworkVariableWithUserSerializatio } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator WhenUsingAUserSerializableNetworkVariableWithUserSerializationViaExtensionMethod_ReplicationWorks() { UserNetworkVariableSerialization.WriteValue = NetworkVariableUserSerializableTypesTestsExtensionMethods.WriteValueSafe; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs index 1879da0174..2bfbf2874b 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs @@ -1,5 +1,6 @@ using System.Collections; using System.Collections.Generic; +using NUnit.Framework; using Unity.Netcode.TestHelpers.Runtime; using UnityEngine; using UnityEngine.TestTools; @@ -98,7 +99,9 @@ protected override void OnServerAndClientsCreated() } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149597", "Unexpected owner write-permission error logged on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("Unexpected owner write-permission error logged on CoreCLR, see https://jira.unity3d.com/browse/UUM-149597")] +#endif public IEnumerator OwnerPermissionTest() { // create 3 objects diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/PeerDisconnectCallbackTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/PeerDisconnectCallbackTests.cs index d273cf9f1f..2daaaf7a5f 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/PeerDisconnectCallbackTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/PeerDisconnectCallbackTests.cs @@ -104,7 +104,9 @@ private void ClientToDisconnect_OnClientStopped(bool wasHost) } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")] +#if ENABLE_CORECLR + [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")] +#endif public IEnumerator TestPeerDisconnectCallback([Values] ClientDisconnectType clientDisconnectType, [Values(1ul, 2ul, 3ul)] ulong disconnectedClient) { m_TargetClientShutdown = false; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTests.cs index 0ec70b0e21..306d329bbf 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTests.cs @@ -91,7 +91,9 @@ protected override void OnCreatePlayerPrefab() } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator TestRpcs() { // This is the *SERVER VERSION* of the *CLIENT PLAYER* RpcTestNB component diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs index f26baeb5d1..964cacac4a 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs @@ -1125,7 +1125,9 @@ public IEnumerator TestValueTypeNativeList(NativeList firstTest, NativeLis #endif [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator WhenSendingAValueTypeOverAnRpc_ValuesAreSerializedCorrectly( [Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), @@ -1540,7 +1542,9 @@ public IEnumerator WhenSendingAnArrayOfValueTypesOverAnRpc_ValuesAreSerializedCo } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator WhenSendingANativeArrayOfValueTypesOverAnRpc_ValuesAreSerializedCorrectly( [Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkBehaviourReferenceTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkBehaviourReferenceTests.cs index fcb3fa5fc7..1306b4a803 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkBehaviourReferenceTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkBehaviourReferenceTests.cs @@ -22,7 +22,9 @@ public NetworkBehaviourReferenceTests(HostOrServer hostOrServer) : base(hostOrSe #region Tests using non-null NetworkBehaviours and RPCs [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator TestRpc() { yield return SpawnTestPrefabInstance(); @@ -37,7 +39,9 @@ public IEnumerator TestRpc() [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator TestRpcImplicitNetworkBehaviour() { yield return SpawnTestPrefabInstance(); diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Transports/SinglePlayerTransportTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Transports/SinglePlayerTransportTests.cs index 33c801cc12..466a4e5a6b 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Transports/SinglePlayerTransportTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Transports/SinglePlayerTransportTests.cs @@ -176,7 +176,9 @@ protected override bool CanStartServerAndClients() } [UnityTest] - [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149592", "NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer)")] +#if ENABLE_CORECLR + [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")] +#endif public IEnumerator StartSinglePlayerAndSpawn() { m_CanStartHost = true; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Unity.Netcode.Runtime.Tests.asmdef b/com.unity.netcode.gameobjects/Tests/Runtime/Unity.Netcode.Runtime.Tests.asmdef index ce23c34a2c..cde139b07f 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Unity.Netcode.Runtime.Tests.asmdef +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Unity.Netcode.Runtime.Tests.asmdef @@ -47,11 +47,6 @@ "name": "Unity", "expression": "6000.1.0a1", "define": "HOSTNAME_RESOLUTION_AVAILABLE" - }, - { - "name": "com.unity.test-framework", - "expression": "1.7.0", - "define": "UNITY_TEST_FRAMEWORK_1_7_OR_NEWER" } ], "noEngineReferences": false diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/UnityCoreClrExplicitDisabledAttributeShim.cs b/com.unity.netcode.gameobjects/Tests/Runtime/UnityCoreClrExplicitDisabledAttributeShim.cs deleted file mode 100644 index 07baa43dc0..0000000000 --- a/com.unity.netcode.gameobjects/Tests/Runtime/UnityCoreClrExplicitDisabledAttributeShim.cs +++ /dev/null @@ -1,14 +0,0 @@ -#if !UNITY_TEST_FRAMEWORK_1_7_OR_NEWER -using System; - -namespace UnityEngine.TestTools -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] - internal sealed class UnityCoreClrExplicitDisabledAttribute : Attribute - { - public UnityCoreClrExplicitDisabledAttribute(string jiraIssue, string reason = null) - { - } - } -} -#endif diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/UnityCoreClrExplicitDisabledAttributeShim.cs.meta b/com.unity.netcode.gameobjects/Tests/Runtime/UnityCoreClrExplicitDisabledAttributeShim.cs.meta deleted file mode 100644 index d3dc8d26c9..0000000000 --- a/com.unity.netcode.gameobjects/Tests/Runtime/UnityCoreClrExplicitDisabledAttributeShim.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b7f17392536340a8b607dd678b2ecd76 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: