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

Fixed folder output, barrier spec failure handling issues in MNTR #2297

Merged
merged 2 commits into from
Sep 20, 2016

Conversation

Aaronontheweb
Copy link
Member

Working on resolviong #2296

made barrier failures more explicit
hardened singleton manager startup spec
@Aaronontheweb Aaronontheweb changed the title [WIP] Debugging multi-node test runner issues Fixed folder output, barrier spec failure handling issues in MNTR Sep 19, 2016
Copy link
Member Author

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MNTR improvements overall and minor hardening to one individual spec.

@@ -31,6 +31,7 @@ public ClusterSingletonManagerStartupConfig()
CommonConfig = ConfigurationFactory.ParseString(@"
akka.loglevel = INFO
akka.actor.provider = ""Akka.Cluster.ClusterActorRefProvider, Akka.Cluster""
akka.remote.retry-gate-closed-for = 1s #fast restart
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardening the ClusterSingletonManagerStartupSpec - in the event two nodes try to connect to eachother at the same time (happens sometimes during Akka.Cluster formation) this lowers the retry gate from 5s to 1s so the spec has an opportunity to retry the association before hitting the deadline.

@@ -156,7 +156,7 @@ static void Main(string[] args)
} -Dmultinode.listen-address={listenAddress} -Dmultinode.listen-port={listenPort}";
var nodeIndex = nodeTest.Node;
//TODO: might need to do some validation here to avoid the 260 character max path error on Windows
var folder = Directory.CreateDirectory(Path.Combine(OutputDirectory, nodeTest.MethodName));
var folder = Directory.CreateDirectory(Path.Combine(OutputDirectory, nodeTest.TestName));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uses the correct test name for the folders used for each of the individual node logs -this prevents two implementations of the same spec from overriding eachother's output.

@@ -244,7 +244,7 @@ public override int GetHashCode()
public sealed class WrongBarrierException : Exception
{
public WrongBarrierException(string barrier, IActorRef client, Data barrierData)
: base($"tried to enter '{barrier}' while we were waiting for '{barrierData.Barrier}'")
: base($"[{client}] tried to enter '{barrier}' while we were waiting for '{barrierData.Barrier}'")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearer barrier exception error message.

@@ -136,7 +136,7 @@ public void Enter(TimeSpan timeout, ImmutableList<string> names)
var askTimeout = barrierTimeout + Settings.QueryTimeout;
// Need to force barrier to wait here, so we can pass along a "fail barrier" message in the event
// of a failed operation
_client.Ask(new ToServer<EnterBarrier>(new EnterBarrier(name, barrierTimeout)), askTimeout).Wait();
var result = _client.Ask(new ToServer<EnterBarrier>(new EnterBarrier(name, barrierTimeout)), askTimeout).Result;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've had false positives in the MNTR previously where specs were still passing even though barriers were failing. This change ensures that an exception is thrown instead, failing the spec for this node if a barrier operation fails.

@marcpiechura marcpiechura merged commit d6b2f9e into akkadotnet:dev Sep 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants