Bootstrap providers not called while running tests inherited from TestingSiloHost
I have a test class inherired from TestingSiloHost And I have configured BootStrap provider in OrleansConfigurationForTesting.xml as below
<Globals>
<StorageProviders>
<Provider Type="Orleans.Storage.AzureTableStorage" Name="AzureStore" DataConnectionString="UseDevelopmentStorage=true" />
</StorageProviders>
<SeedNode Address="localhost" Port="22222"/>
<BootstrapProviders>
<Provider Type="DependencyInjectionWrapper.DependencyRegistration"
Name="dependencyinjection"
InstanceCount="1"/>
</BootstrapProviders>
<Messaging ResponseTimeout="30s"/>
But DependencyRegistration class is not called when running the tests. Is Bootstrap supported for test cases as well?
you also need to make sure the dll with that provider is copied to test dir. Add [DeploymentItem("My.dll")] to the test class. Is it still does not work, please share your full silo log, at Info tracing level.
With help of @gabikliot , I was able to figure out the issue
The issue is that , the “OrleansConfigurationForTesting.xml” file was not directly under the test project. I had moved it under a subfolder “config”. Hence when the test project was built the intended config file was not copied to output folder. Instead, it referred an old config file in output folder which did not have “BootStrapProvider” tags.
Thanks a lot @gabikliot