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

Concurrent Test Grain Factory #155

Conversation

cmeyertons
Copy link
Contributor

The TestGrainFactory can be invoked outside the Orleans thread-safety guarantees in a parallel fashion by code that is invoking via IClusterClient and should offer functionality for concurrency guarantees.

I received an error in some new code in our codebase that we had to re-shape business logic to satisfy the unit test error

@seniorquico
Copy link
Collaborator

To be clear... the entire TestKit operates without Orleans concurrency guarantees. From the README:

The simulated grain activation context does not provide the single-threaded execution model of the Microsoft Orleans runtime. It is up to you to ensure the grain activation is used appropriately. Unfortunately, this may result in abnormal method execution or behaviors that are impossible to reproduce, especially in reentrant grains.

From the PR description and based on the new test added, it sounds like the SUT is not a grain activation, but instead some other service depending on IClusterClient. This is outside the scope of the TestKit. Instead the service should make use of its own test double/fake/mock that does not rely on a TestKit-created grain activation.

Please let me know if I'm misunderstanding something, but this looks undesirable for the TestKit.

@seniorquico
Copy link
Collaborator

This still appears to be out of scope for the TestKit. Closing for now, but happy to re-evaluate if there's more to discuss.

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

2 participants