orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Help wanted: Replace all usages of TestingSiloHost with TestCluster

Open jdom opened this issue 10 years ago • 11 comments

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 avatar Sep 27 '16 22:09 jdom

@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.

nikhilgupta23 avatar Sep 28 '16 18:09 nikhilgupta23

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

jdom avatar Sep 28 '16 18:09 jdom

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?

amccool avatar Oct 04 '16 00:10 amccool

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

jdom avatar Oct 04 '16 01:10 jdom

is this:

new TestingSiloHost(new TestingSiloOptions
                {
                    StartPrimary = true,
                    StartSecondary = false,
                })

the same as

new TestClusterOptions(initialSilosCount:1);

amccool avatar Oct 04 '16 18:10 amccool

yes, almost equivalent. BTW, did you start this work then?

jdom avatar Oct 04 '16 18:10 jdom

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

jdom avatar Oct 04 '16 18:10 jdom

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.

amccool avatar Oct 07 '16 16:10 amccool

I just added #2321 - Should I just claim this issue so we take it to WIP?

amccool avatar Oct 19 '16 21:10 amccool

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.

jdom avatar Oct 19 '16 22:10 jdom

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.

amccool avatar Oct 28 '16 15:10 amccool