Build/Test Issues

Not abled to run Test ASP.NET TestHost.TestServer on GridNode

Started by Der-Albert.com on 2,132 views

Hi,

in the last days I worked with some ASP.NET Core 2.2 "Unit Tests". Which are using the TestHost, prior to 2.2 this was not possible to do with NCrunch, so I like that it is now running with the patches you guys made to NCrunch and ASP.NET Core 2.2. Thank you for that.

But i noticed that the speed of the Test running was not fast a usual, first i thought is was because of the nature of the test. But i also noted unusal high activity on my work machine.

Because i may be offline a while a ago i hat configured the system to run the test locally (1 Core) and on the GridNode (4 Cores, 8 Threads). So i disabled local test running and watch the NCrunch distributed processing window.
This constanly change between "Initializing", "Negotiating". But it never transferd files, or run even test in that solution.

I digged a little bit deeper (Cleaning Up .NET Core SDKs, cleaning the NCrunch RamDisk, repairing NCrunch install). Nothing helped. But other projects worked.

So i digged in the logs.


ENGINE - [14:31:41.6214-?-19] ERROR (Internal): System.Exception: Type 'nCrunch.Core.InlineModules.AspNetMvcTestHostModule+' is not marked as serializable. Resolution path =
nCrunch.Core.InlineModules.AspNetMvcTestHostModule+

at nCrunch.Common.Serialization.SerializationContractType..ctor(UInt16 typeId, Type type, IList`1 fields, Boolean isMarshalByRefType, Boolean hasPotentialInheritors, SerializationPath path, Boolean wasAddedDynamically)
at nCrunch.Common.Serialization.SerializationContract.AddTypeToContract(Type instanceType, Boolean isAddedDynamically)
at nCrunch.Common.Serialization.BinarySerializer.lookupAndWriteContractType(SerializationContext context, Type instanceType)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.SerializationCacheTable.WriteCachedInstance(SerializationContext context, Object instance, Type knownInstanceType)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.CustomTypeSerializers.DelegateSerializer.Serialize(SerializationContext context, SerializationContractType type, Object value, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Core.SnapshotComponent.Serialize(SerializationContext context)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.SerializeList[T](SerializationContext context, IList`1 list)
at nCrunch.Core.Snapshot.Serialize(SerializationContext context)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Core.Grid.Messages.GridMessage.GetSerializedMessageData(BinarySerializer serializer)
at nCrunch.Core.Grid.Connectivity.GridMessageSender.()
at nCrunch.Core.Grid.Connectivity.GridMessageSender.()
at nCrunch.Core.Threading.PooledWorkItem.Start()
at nCrunch.Core.Threading.ThreadFactory.(Object )

ENGINE - [14:32:51.1315-?-30] ERROR (Internal): System.Exception: Type 'nCrunch.Core.InlineModules.AspNetMvcTestHostModule+' is not marked as serializable. Resolution path =
nCrunch.Core.InlineModules.AspNetMvcTestHostModule+

at nCrunch.Common.Serialization.SerializationContractType..ctor(UInt16 typeId, Type type, IList`1 fields, Boolean isMarshalByRefType, Boolean hasPotentialInheritors, SerializationPath path, Boolean wasAddedDynamically)
at nCrunch.Common.Serialization.SerializationContract.AddTypeToContract(Type instanceType, Boolean isAddedDynamically)
at nCrunch.Common.Serialization.BinarySerializer.lookupAndWriteContractType(SerializationContext context, Type instanceType)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.SerializationCacheTable.WriteCachedInstance(SerializationContext context, Object instance, Type knownInstanceType)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.CustomTypeSerializers.DelegateSerializer.Serialize(SerializationContext context, SerializationContractType type, Object value, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Core.SnapshotComponent.Serialize(SerializationContext context)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.SerializeList[T](SerializationContext context, IList`1 list)
at nCrunch.Core.Snapshot.Serialize(SerializationContext context)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.WriteInstance(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheCollectionContents)
at nCrunch.Common.Serialization.BinarySerializer.Serialize(SerializationContext context, Object instance, Type knownInstanceType, Boolean cacheInstance, Boolean cacheCollectionContents)
at nCrunch.Core.Grid.Messages.GridMessage.GetSerializedMessageData(BinarySerializer serializer)
at nCrunch.Core.Grid.Connectivity.GridMessageSender.()
at nCrunch.Core.Grid.Connectivity.GridMessageSender.()
at nCrunch.Core.Threading.PooledWorkItem.Start()
at nCrunch.Core.Threading.ThreadFactory.(Object )



That's more or less all of the errors.

If more is needed i can submit you the project.

A quick fix would be very nice.

Best Regards

Albert
Good catch! Thanks for sharing this. It looks like we didn't test the ASP.NET TestHost properly using distributed processing.

I have a fix pending, but our build system is dealing with the VS2019 chaos at the moment, so it might be a few days before I'm able to get it published for you.
Here's a build with a fix:

NCrunch_Console_3.24.0.1.msi
NCrunch_Console_3.24.0.1.zip
NCrunch_GridNodeServer_3.24.0.1.msi
NCrunch_GridNodeServer_3.24.0.1.zip
NCrunch_LicenseServer_3.24.0.1.zip
NCrunch_VS2008_3.24.0.1.msi
NCrunch_VS2010_3.24.0.1.msi
NCrunch_VS2010_3.24.0.1.zip
NCrunch_VS2012_3.24.0.1.msi
NCrunch_VS2012_3.24.0.1.zip
NCrunch_VS2013_3.24.0.1.msi
NCrunch_VS2013_3.24.0.1.zip
NCrunch_VS2015_3.24.0.1.msi
NCrunch_VS2015_3.24.0.1.msi.7z
NCrunch_VS2015_3.24.0.1.zip
NCrunch_VS2017_3.24.0.1.msi
NCrunch_VS2017_3.24.0.1.msi.7z
NCrunch_VS2017_3.24.0.1.zip
Did no get the message from the Board with the available fix. Sorry, will check this now.
Found the .0.2 build, will test with that build.

Post a reply

Log in to reply.