Help wanted: Replace all usages of TestingSiloHost with TestCluster
Our plan is to make TestingSiloHost obsolete as it was completely superseded by the more flexible TestCluster. Nevertheless, we have several tests in the TesterInternal project that are still using it and the declarative config that need to be converted.
We should do a pass and remove all references to the TestingSiloHost class.
In order to do that, those tests would have to stop using the XML configuration, and use programmatic configuration.
For reference, PR #1643 is where the Tester project was migrated to use TestCluster, and specifically this commit from it: https://github.com/dotnet/orleans/pull/1643/commits/d931e6a418eb3ec119c1a254d18b90967fe595f1
@jdom I am not familiar with this project but will still like to contribute by solving this issue (as part of Hacktoberfest). Is there something else that needs to be taken care of or a simple replace of all instances in https://github.com/dotnet/orleans/tree/master/test/TesterInternal will do? Thanks.
Hi, thanks for offering help. I updated the main description with some info about the move, plus reference info:
In order to do that, those tests would have to stop using the XML configuration, and use programmatic configuration. For reference, PR #1643 is where the Tester project was migrated to use TestCluster, and specifically this commit from it: https://github.com/dotnet/orleans/pull/1643/commits/d931e6a418eb3ec119c1a254d18b90967fe595f1
how much do the specifics like the port numbers matter in these XML configs? case to point https://github.com/dotnet/orleans/blob/master/test/TesterInternal/Config_BootstrapProviders.xml#L26 shouldn't we want to use the TestCluster defaults?
They do not matter, and specifically for ports, it matters that they are not the same for each cluster, which is one of the benefits of moving to TestCluster, where you get the default config and you just override some specific settings that are relevant to just that test fixture
is this:
new TestingSiloHost(new TestingSiloOptions
{
StartPrimary = true,
StartSecondary = false,
})
the same as
new TestClusterOptions(initialSilosCount:1);
yes, almost equivalent. BTW, did you start this work then?
Nevertheless, most of the times just try to use the default collection fixture if there is no need for a specific cluster to be spawn up. This will reduce the test run time considerably. Only create a new fixture if there is something specific about it
along with #2255 I have two more commits.
- One for HostedTestClusterPerTest to use TestCluster ( I think this is straight forward ) https://github.com/amccool/orleans/tree/HostedTestClusterPerTest-to-TestCluster
- One for the tests that need a new method for RegisterStatisticsProvider
and an update to ShardedStorageProvider. https://github.com/amccool/orleans/tree/Partial-implemation-of-RegisterStatisticsProvider
perhaps I should see about splitting the commits for RegisterStatisticsProvider, and ShardedStorageProvider.
I just added #2321 - Should I just claim this issue so we take it to WIP?
I'd say that since you are the one adding PRs (and intend to add more), it's fair to say it's officially claimed. If someone else was considering this issue they'll know it's being done by you, or should at least coordinate with you if they are feeling really passionate about helping with it.
I would like to create another PR, which removes more of TestingSiloHost (only Geo-Cluster remain). However, I'm getting hung up on creating a RegisterStatisticsProvider and RegisterShardedStorageProvider and getting them working correctly. The BVTs are green.