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

[SpecFix] fixed Passivation_of_inactive_entities spec #3801

Conversation

Aaronontheweb
Copy link
Member

@@ -132,7 +132,7 @@ public void Passivation_of_inactive_entities_must_passivate_entities_when_they_h

// Make sure "1" hasn't seen a message in 3 seconds and passivates
var timeSinceOneSawAMessage = DateTime.Now.Ticks - timeOneSawMessage;
probe.ExpectNoMsg(TimeSpan.FromSeconds(3) - TimeSpan.FromTicks(timeSinceOneSawAMessage));
probe.ExpectNoMsg(TimeSpan.FromSeconds(3) - TimeSpan.FromTicks(timeSinceOneSawAMessage) - TimeSpan.FromMilliseconds(40));
Copy link
Member Author

Choose a reason for hiding this comment

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

The fix here was simple - this spec, when it'd fail on the build server, would be for reasons like this:

Failed: Expected no messages during 00:00:00.9951057, instead we received <1 passivating> from [akka://AkkaSpec/system/sharding/myType/1/1#392767797] after 00:00:00.9946593
Expected: True
Actual: False

The issue in this case is that the time we were setting during the ExpectNoMsg period is more precise than what's allowed by the server's clock resolution. Thus, I padded the time by an additional 40ms - which should be plenty enough to make sure the test is still meaningful but a big enough margin to avoid having the test too tightly fitted.

@Aaronontheweb
Copy link
Member Author

Race conditions still aren't quite resolved yet even though the last build passed - have some more hardening to do on this spec.

@Aaronontheweb
Copy link
Member Author

Covered via #3780

@Aaronontheweb Aaronontheweb deleted the 3786-fix-Passivation_of_inactive_entities branch May 21, 2019 18:19
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.

None yet

1 participant