A simplified unit test cluster with shared DI and routine setup #9826
alexdresko
started this conversation in
Ideas
Replies: 2 comments
-
|
I should mention that some of the code is AI generated. I started with how I wanted the tests to look, and asked it to create a starting point based on InProcessTestCluster. If the implementation is way off base, let me know and I'll dig in. I'm just trying to get the ball rolling, and I think this is a good start if anything. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Random bump because I still really really need this and it seems like many others would as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@ReubenBond since you created the InProcessTestCluster, would you mind looking at the solution I created for #8790?
In short, we need the ability to set up our tests using
WebApplication.CreateBuilder()as the starting point, as that allows for a more complete setup of the root builder. It more closely resembles the standard setup for an application using Orleans (builder.UseOrleans(...)), and maintains a shared DI container between the tests and Orleans, all while (theoretically) inheriting the performance benefits of InProcessTestCluster.I would like to get this merged into the main repo due to the requirements for
[assembly: InternalsVisibleTo("Orleans.TestingHost.HostBuilder")]. I wanted to get some feedback before heading down that path, though.Please, and thank you for your time.
See the working example here: https://github.com/alexdresko/orleans/blob/alex-2/test/HostBuilderTestCluster.Tests/HostBuilderTestClusterTests.cs
The cluster itself is at https://github.com/alexdresko/orleans/tree/alex-2/src/Orleans.TestingHost.HostBuilder
Beta Was this translation helpful? Give feedback.
All reactions