Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Not abled to run Test ASP.NET TestHost.TestServer on GridNode
Der-Albert.com
#1 Posted : Thursday, February 14, 2019 1:42:35 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 209

Thanks: 11 times
Was thanked: 55 time(s) in 51 post(s)
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.

Quote:

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
Remco
#2 Posted : Friday, February 15, 2019 12:12:06 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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.
Remco
#3 Posted : Friday, February 15, 2019 5:41:55 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
1 user thanked Remco for this useful post.
Der-Albert.com on 2/19/2019(UTC)
Der-Albert.com
#5 Posted : Tuesday, February 19, 2019 9:34:11 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 209

Thanks: 11 times
Was thanked: 55 time(s) in 51 post(s)
Did no get the message from the Board with the available fix. Sorry, will check this now.
Der-Albert.com
#6 Posted : Tuesday, February 19, 2019 9:36:12 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 209

Thanks: 11 times
Was thanked: 55 time(s) in 51 post(s)
Found the .0.2 build, will test with that build.
Der-Albert.com
#4 Posted : Tuesday, February 19, 2019 9:42:55 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 209

Thanks: 11 times
Was thanked: 55 time(s) in 51 post(s)
Remco;13080 wrote:
Here's a build with a fix:

and the build fixed the problem! Thanks.
1 user thanked Der-Albert.com for this useful post.
michaelkroes on 2/19/2019(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.075 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download