Default testcluster size - #1856
Conversation
This is to spot serialization issues that don't occur in a 1 silo deployment that just does deep copying.
acb2dd7 to
3d3ead4
Compare
|
If our BVT test runs are getting too long, I'd prefer we look into speeding them up via optimizations or parallelization rather than reducing test coverage. |
|
As a bit of a outsider comment, the contents of this PR look OK, but I'd raise the same concern as @jason-bragg about demoting. Maybe it is worth nothing here too cleaning up tests has come into discussion from time to time. @jason-bragg About parallelization and perhaps optimizations, not trying to hijack this thread, I wrote a short spike at #1803 with one the goals having tests run in parallel (in every environment) skipping those that cannot be run (e.g. no ZooKeeper installed. |
|
regardless of parallelization i wouldn't expect hat any single test that we use for TDD (which should by design be very fast) take more than a few milliseconds. I did not go that far as being overly aggressive, but the ones I demoted here were taking more than 15seconda each (some of them a minute). |
|
BTW, I could tag them with something like "SlowBVT" and have our CI servers run them, we just don't pay that tax on every single time we run BVTs while developing |
|
@jdom I'm what one could describe as an occasional contributor so you should take my opinion as such, from this perspective I'm OK with the changes as it unlocks you. I'm familiar with the pain you experience, which is one of the reasons for a more concrete proposal at #1803. I prefer to run through the whole suite before submitting a PR for review, and othertimes too I usually just run through the whole suite of relative tests, most likely the ones tagged with SQL Server or MySQL. I would like these tests to be fast and I don't see an immediate reason on why they couldn't be run in low tens of milliseconds each – unless stress testing excluding a cluster setup when it is warranted. It looks to me even the cluster setup could be very fast with explicit list of assemblies, perhaps caching them, creating clusters in parallel etc. that we seem to get in the future. This goes into another discussion already, but I linked a Stackoverflow question in #1803 that specifically asks to run theories in parallel across backends. It was not recommended and the arrangement taken was much like in #1803. To me it looks constructor injection of the SUT on the class having the concrete test classes would be the way, but XUnit.NET doesn't do that out-of-the-box, the authors tell elsewhere they didn't want to include a IoC system in the tests. The arrangement for runnign tests I spiked gets close to this but one has to duplicate the theories (basically copy and paste) to pass-through shims (i.e. SQL Server, MySQL, Azure Table Storage etc.) delegating the parameters to the actual test class. It looks to me this could work without malleating XUnit.NET to something else. Instead of theories it might be possible to generate (fuzzed) test input like IntelliTest with FsCheck. |
|
I don't disagree with the idea of fast BVTs. Every large project with automated testing eventually gets to the point where build and build verification times becomes an issue, but when this happens the first step should not, imo, be to start dropping test coverage. I'm ok with a SlowBVT tag if we add some sort of warning to the bvts that help us detect slow running tests so that we have an opportunity to improve the test performance prior to more extreme actions. Some of the tests removed here are streaming tests that I've not even looked into making faster. Maybe they could be fixed.. I suggest the following:
|
They are still being run by our CI server on every pull request, just not every time a dev wants to run all BVTs.
3d3ead4 to
c69f330
Compare
|
Marked the demoted tests as SlowBVT and updated scripts so that they run in each PR. We can set up a task for later on to look at any SlowBVT with the potential to improve its speed. This will probably be low priority as the ROI at that point is not super high (some of these have to take long to run, since they are asserting the lack of action, although the timeout times could be made shorter, but not instant, hence you might shave off a few seconds of very long running tests). |
This is to spot serialization issues that don't occur in a 1 silo deployment that just does deep copying.
They are still being run by our CI server, just not every time a dev wants to run all BVTs or for every pull request.
This should shave off a couple of minutes from our BVT run