As with https://github.com/dotnet/corefx/pull/9468 and https://github.com/dotnet/corefx/pull/9466, this commit focuses on reducing the total, outerloop running time of our worst-offending test suites. This one is on the System.Threading.Tasks tests. Some of the tests are not in good shape, e.g. it's not clear to me that the TaskCancelWaitTests are actually verifying everything they should, even though they're spending a lot of time doing it.
Changes:
- Reduced artificially long wait times in TaskAwaiter, IAsyncResult, TaskCancelWaitTests, TaskStatusTests, CESchedulerPairTests, and Coverage tests
- Reduced size of workload in TaskCancelWaitTests, TaskContinueWithAllAnyTests, and TaskWaitAllAnyTests
- Ensured that the ThreadPool was ramped up to serve several tests expecting more threads available
- Removed some unnecessary spinning
Commit migrated from https://github.com/dotnet/corefx/commit/a6f8d2f00a841ecb78ec0dfec723d10d9a88a5fa
Various areas of these tests could really stand to be rewritten. This commit does not attempt to do that. Rather, my goal was to significantly reduce the running time of the tests. Today, with outerloop enabled, they take ~200 seconds. This commit gets that down to ~6 seconds.
Three small changes:
- Some of the tests were relying on a barrier to ensure that all tasks had started before any proceeded. This resulted in a long delay while the thread pool ramped up slowly to having the desired number of threads. I put in place a little hack to force it to quickly ramp up.
- Some of the tests were explicitly waiting for 1 seconds. I lowered that to 0.01 seconds. This is an example of it not being clear why the delay exists at all, but regardless, this shaves off a lot of time.
- ~25 of the TestFor_Boundary [InlineData]s were specifying a very high workload count that was resulting in each of them taking 6-8 seconds to run. This is unnecessary, as it's of little value to the testing to have a delegate just chewing up CPU for long periods of time. I've simply deleted them.
Commit migrated from https://github.com/dotnet/corefx/commit/4285ffaa6237b0f637572cbf9707b2f86da21107
CoreFX tests will now compile against netstandard1.3 as references and will now deploy for the platforms listed in their respective supports clause, provided the appropriate TestTFM is passed in. The supports are fully listed inside runtime.json in the new TestSuite metapackage in buildtools. The tests will default to netcoreapp1.0 as their TestTFM.
CoreFx test projects now utilise a test csproj to pkgproj reference which determine the appropriate compile time and runtime assets needed.
Dependent on https://github.com/dotnet/buildtools/pull/770
Commit migrated from https://github.com/dotnet/corefx/commit/b4841454de7ddcd75e92e2bb24ebb238a82df43f
Requires https://github.com/dotnet/buildtools/pull/751
This makes all the tests resolve using NETCoreApp1.0 instead of
DNXCore50. I've removed the netstandard1.6 import since that is no
longer needed. I've also removed the workarounds from tests that were
targeting netcoreapp1.0 on their own. For restore compat I've added an
DNXCore50 import to every test project. These can be removed once
test-runtime packages are updated to target NETCoreApp1.0.
I've updated all the test scripts which were assuming DNXCore50 as well
as docs which referred to this path.
Commit migrated from https://github.com/dotnet/corefx/commit/7ba4d296e3e0a2445ffa708c1e918d90d2bac69c
- Add "debian.8-x64". This is the correct rid for Debian, after this
lands, I will need to update CI before we can remove "debian.8.2-x64"
- Add a generic "linux-x64" rid which we can use in cases where we want
to build for a distro where we don't yet have a set of runtime
packages. This will let us restore the managed assets (since they are
specific to "unix" or "linux" and then folks can do a native build to
get the shims and runtime and copy them over (this is a more
reasonable approach than our current strategy of just using
ubuntu.14.04-x64)
- Sort runtime sections
Commit migrated from https://github.com/dotnet/corefx/commit/6fa4bc1d215d17ff484aa3f541c5e3181f6918de