orleans icon indicating copy to clipboard operation
orleans copied to clipboard

TestClusterBuilder.AddSiloBuilderConfigurator

Open dgioulakis opened this issue 7 years ago • 3 comments

Please consider creating an overload for AddSiloBuilderConfigurator<T> that allows you to provide a func for ISiloBuilderConfigurator.Configure() and not just a type name. I'm finding it very difficult to write functional tests that depend on being able to mock dependencies registered with UseServiceProviderFactory's DI container. I basically have to write a new ISiloBuilderConfigurator concrete type for each test if the mock behavior varies.

Anyone have a good solution for this? I have no way of injecting via constructor into the ISiloBuilderConfigurator other dependencies that might help mitigate this.

dgioulakis avatar Feb 24 '19 10:02 dgioulakis

I think this has been brought up by someone before, see #4670. and the issue then is the difficulty to serialize a lambda. Because back then, regardless of whatever form silo configuration is, it needs to be serialized into an app domain, because each silo is created in an app domain.

But right now, we have a choice to run a silo in an app domain or in process, maybe we can do this now, for the ones running in process. I will look into this

xiazen avatar Mar 15 '19 01:03 xiazen

We are marking this issue as stale due to the lack of activity in the past six months. If there is no further activity within two weeks, this issue will be closed. You can always create a new issue based on the guidelines provided in our pinned announcement.

ghost avatar Dec 11 '21 01:12 ghost

This issue has been marked stale for the past 30 and is being closed due to lack of activity.

ghost avatar Mar 05 '22 02:03 ghost