Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore functionality to existing MNTR specs #3243

Closed
3 tasks
Aaronontheweb opened this issue Jan 2, 2018 · 1 comment · Fixed by #3245
Closed
3 tasks

Restore functionality to existing MNTR specs #3243

Aaronontheweb opened this issue Jan 2, 2018 · 1 comment · Fixed by #3245

Comments

@Aaronontheweb
Copy link
Member

I'm not sure what change caused this exactly (could have been an XUnit upgrade,) but since then all of the Akka.Remote and Akka.Cluster MNTR specs have thrown an error upon discovery and have not been run. The discovery error is not logged as a fault by the MNTR runner process itself, hence why it hasn't shown up at all in any of our integration tests.

Here's the error, from the MNTR logs on TeamCity:

[17:36:16] :		 [MultiNodeTests] System.ArgumentException: [Akka.DistributedData.Tests.MultiNode.DurableDataSpecNode1] or one of its base classes must specify constructor, which first parameter is a subclass of Akka.Remote.TestKit.MultiNodeConfig
[17:36:16] :		 [MultiNodeTests] Server stack trace: 
[17:36:16] :		 [MultiNodeTests]    at Akka.MultiNodeTestRunner.Discovery.FindConfigConstructor(Type configUser)
[17:36:16] :		 [MultiNodeTests]    at Akka.MultiNodeTestRunner.Discovery.RoleNames(Type specType)
[17:36:16] :		 [MultiNodeTests]    at Akka.MultiNodeTestRunner.Discovery.OnMessage(IMessageSinkMessage message)
[17:36:16] :		 [MultiNodeTests]    at Xunit.MessageSinkWithTypesAdapter.OnMessageWithTypes(IMessageSinkMessage message, HashSet`1 messageTypes)
[17:36:16] :		 [MultiNodeTests]    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
[17:36:16] :		 [MultiNodeTests]    at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

To fix this issue, the following libraries all need to be updated to use the new format (need default constructors for all specs) in order to be run again; either that or we need to fix the functionality of the MNTR discovery engine to be backwards compatible:

  • Akka.DistributedData.Tests.MultiNode
  • Akka.Cluster.Tests.MultiNode
  • Akka.Remote.Tests.MultiNode

I don't feel comfortable releasing 1.3.3 until this is done so we can verify that the changes we've made to Akka.Cluster, Cluster.Sharding, and DistributedData are safe.

@Aaronontheweb
Copy link
Member Author

Looks like the issue here is an edge-case with some specific tests that cause the test runner to crash, such as:

public class RemoteReDeploymentSlowMultiNetSpec : RemoteReDeploymentSpec
{
public RemoteReDeploymentSlowMultiNetSpec():base(typeof(RemoteReDeploymentSlowMultiNetSpec))
{ }

The LINQ being used here isn't able to find a valid match:

#if CORECLR
var ctorWithConfig = configUser
.GetConstructors(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance)
.FirstOrDefault(c => null != c.GetParameters().FirstOrDefault(p => p.ParameterType.GetTypeInfo().IsSubclassOf(baseConfigType)));
current = current.GetTypeInfo().BaseType;
#else
var ctorWithConfig = configUser
.GetConstructors(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance)
.FirstOrDefault(c => null != c.GetParameters().FirstOrDefault(p => p.ParameterType.IsSubclassOf(baseConfigType)));
current = current.BaseType;
#endif
if (ctorWithConfig != null) return ctorWithConfig;

If we can fix the LINQ statements there or modify these specs to conform to the standard they're currently looking for, that should fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant