Commit Graph
34 Commits
Author SHA1 Message Date
Stephen Toub 6072e4d3a7 Update license headers (#38793) 2020-07-08 09:23:11 -04:00
Santiago Fernandez Madero 110282c71b Update all issues in source code to point to runtime (#32349) 2020-02-18 15:49:23 -08:00
Stephen ToubandJan Kotas ccf6aedb63 Address more issue numbers in the code (#1888)
* Address more issue numbers in the code

Replaced a bunch of unadorned issue numbers with links, so we know which repo the issue is for.  In some cases the repo was named, but for consistency I still replaced it with a link.

In some cases, in particular where the issue had been closed saying effectively "we're not going to do anything here", I removed TODOs and the associated issue numbers.

In a few cases, the TODO and issue number was to say "we should do X when Y is fixed", so I did X since Y was fixed.

* Apply suggestions from code review

Co-Authored-By: Jan Kotas <[email protected]>

* Address PR feedback

* Fix OrderedEnumerable by using MemoryExtensions.Sort

Co-authored-by: Jan Kotas <[email protected]>
2020-01-18 00:52:17 -08:00
Stephen Toub 04f22268ef Change all ActiveIssues to use Uris instead of numbers (#1768) 2020-01-15 23:21:36 -05:00
Stephen Toub d0872da0f2 Fix PLINQ outerloop tests (dotnet/corefx#40589)
* Revert dotnet/corefx#40415's changes to PLINQ tests

They broke outerloop significantly.

* Fix MemberData(BinaryOperations) usage in PLINQ

Lots of outerloop tests are failing because xunit is preferring the wrong overload of the BinaryOperations method via reflection.  This just renames some of the methods to avoid the overloads.


Commit migrated from https://github.com/dotnet/corefx/commit/8429c2a5cc01ac07122f4439f360f8ab2ca4ae86
2019-08-26 20:47:04 -04:00
madmir 6f12721616 Re-enable xunit warning 1019 (dotnet/corefx#40415)
Make MemberData reference IEnumerable<object[]>

Commit migrated from https://github.com/dotnet/corefx/commit/3c09762fa14249c65e5bc676a5d812c2654c8941
2019-08-19 20:59:07 -04:00
Stephen Toub c8df52dd02 Re-enable xunit warning 1026 (unused theory arguments) (dotnet/corefx#40079)
* Re-enable xunit warning 1026 (unused theory arguments)

Some of these were addressed by explicitly discarding theory arguments, generally in cases where either a) the argument was being used as a description to aid in debugging failures, or b) the argument was part of a member data that was used by some theories and not by others all sharing the same member data.

However, there are quite a few legitimate bugs being fixed here, enough that highlights it's worthwhile to have the rule enabled.  Some are cases where the argument was supposed to be used but wasn't.  Some are cases where the argument isn't used at all, and in many cases where we end up running the same test over and over and wasting cycles.  Some are cases where we're unnecessarily including irrelevant inputs to the tests and making the input data more complicated than it needs to be.  Etc.

(Along the way, I also fixed some cases where VS was warning about lambdas being used instead of local functions, and in cases where I agreed I fixed them, via auto-fixers.)

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/daf93ee0e5e5233141eb762c64b6049cfd7d123e
2019-08-07 08:00:27 +02:00
Stephen Toub 037d5e0eba Re-enable xUnit1016 (public MemberDatas) (dotnet/corefx#39738)
Commit migrated from https://github.com/dotnet/corefx/commit/306fe9d60cc6db02a69d8ea6b88dde2b98fe8a7c
2019-07-24 20:46:54 -04:00
Viktor Hofer b661c58b1c Replace netstandard test projects with tfms
Netstandard test projects are broken by design and don't support the
Microsoft.Net.Test.SDK. Replacing the netstandard tfm with the concrete
implementation tfms.


Commit migrated from https://github.com/dotnet/corefx/commit/d29c16c99c6045ee67444a7a693dd4476861c463
2019-05-30 16:18:41 +02:00
Stephen Toub 60883a796a Fix order of "static public" in test file
Commit migrated from https://github.com/dotnet/corefx/commit/ebba368b0f5e37cf12a22774b90cb54600ce6760
2019-04-30 22:04:13 -04:00
Tomas Weinfurt 805c0ae88c disable ParallelQueryCombinationTests on ARM systems with high core count (dotnet/corefx#37319)
Commit migrated from https://github.com/dotnet/corefx/commit/0409c03ac353f93e7598d0ebd19017f43b944efb
2019-04-30 22:03:23 -04:00
Nikita Potapenko 28f63d6f4e Fix typo (dotnet/corefx#36107)
.Net -> .NET

Commit migrated from https://github.com/dotnet/corefx/commit/d29ae79fb13b4df9078400ac49b460e011f96404
2019-03-17 15:43:21 -07:00
Max Kerr 25bf20993e Disable problematic Linq.Parallel test. (dotnet/corefx#32702)
Commit migrated from https://github.com/dotnet/corefx/commit/f5ba053ec0ff8a3a74917f47a56b2927de27473e
2018-10-08 21:59:37 -04:00
jswolf19 4cc6c9892e ParallelEnumerable.GroupJoin/Join output ordering (fixes dotnet/corefx#1155) (dotnet/corefx#27930)
* added project for performance tests

* added performance tests for GroupJoin and Join creation and enumeration

* cleaned up Join/GroupJoin perf tests

* added GroupBy perf tests for comparison purposes

* added perf test for Join when left source is OrdinalIndexState.Shuffled

* modified Join/GroupJoin/GroupBy perf tests to get a better profile for different left/right/group sizes

* added GroupBy EnumerateGroup perf tests

* added Join perf test for Shuffled left and unordered right

* added larger right element list sizes to perf tests to GroupJoin with ordered right and Join with ordered left and ordered right

* wrapping right stream of joins to enable preserving order (needed to fix issue dotnet/corefx#1155)

* Factored out building rightHashLookup to eventually move to a separate class to allow for ordering of elements

* refactored out the list of right values for hash joins

* added comments and changed type param names on HashLookupValueList

* Added HashLookupBuilder

* added comments and changed type param names on HashLookupBuilder

* factoring out HashLookupBuilder as an abstract  base class and an implementation for use with Join operations

* modifying JoinQueryOperator to use the HashJoinQueryOperatorEnumerator constructor taking a HashLookupBuilder

* added HashJoinHashLookup to wrap calls to TryGetValue of HashLookup in HashJoinQueryOperatorEnumerator

* added a Head accessor to HashLookupValueList to allow for adding to the GroupJoin result list

* moved JoinHashLookup inside JoinHashLookupBuilder as it should only be used there

* added GroupJoinHashLookupBuilder for unordered group join

* refactored common HashLookup building code to base class

* removed old HashJoinQueryOperatorEnumerator constructor and unnecessary handling of multiple types of resultSelectors

* handling GroupJoin with an ordered right (inner) ParallelQuery

* Revert "added a Head accessor to HashLookupValueList to allow for adding to the GroupJoin result list"
ended up not using the Head accessor
This reverts commit dotnet/corefx@26eb5014fb.

* preparing to allow for a combined key when both left and right sources are ordered

* added handling for a right key on GroupJoins when both the left and right sources are ordered

* added PairOutputKeyBuilder for when both left and right sources of a Join/GroupJoin are ordered

* handling GroupJoins when both left and right sources ordered

* added tests that include collisions in the left ordering to make sure the right key ordering is affecting the output ordering

* handling parallel Join with an ordered right source

* reverting some of the original probe phase of HashJoinQueryOperatorEnumerator.MoveNext source to have a closer memory use/copy profile especially in unordered cases

* moved HashJoin helper classes to the files where they are used

* added SkipOnTargetFramework netfx to tests that assume right ordering is preserved

* added information to SkipOnTargetFramework as per review

* fix for Join so that ambiguous ordering of left elements does not result in mixed output (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372007875 and following for examples)

* refactored common code of left ordering collision tests

* moved left collision test helper class

* add Join tests with non-uniquely ordered lefts and unordered rights (to illustrate behavior change described in https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)

* changed OrdinalIndexState.Increasing comment to remove ambiguity (it does not allow equal indices). This is an important distinction for Join, SelectMany, Skip/Take, etc.

* changed OrderedGroupByGrouping.DoneAdding to use Array.Sort to improve performance

* removed unnecessary member/comparer from OrderedGroupByGrouping

* changed OrderedGroupByGrouping to use ListChunk for accumulating data

* added the Service to System.Linq.Parallel.Tests.csproj that visual studio so desperately wants


Commit migrated from https://github.com/dotnet/corefx/commit/28121c077ec06124c2cec82e10704c9f2a05977c
2018-05-31 15:59:05 -07:00
Stephen A. Imhoff 18c614a8ee Let First/FirstOrDefault combinatorial accept exception.
Commit migrated from https://github.com/dotnet/corefx/commit/bf005fb61d102c7aa35c262b776e78864f83af80
2017-05-09 20:16:38 -07:00
Stephen Toub a39570716a Fix PLINQ tests for desktop
- Avoid using Enumerable.Append, which isn't available in desktop
- Suppress tests on desktop where the test is verifying a bug fix in core
- Allow some variance to account for different floating point support in desktop vs core


Commit migrated from https://github.com/dotnet/corefx/commit/ed3ec8b0681211e82036a294c7857d77a4edabf2
2017-04-19 12:56:41 -04:00
Stephen A. Imhoff 32bf4b0503 Change to default labeled source for both directions.
Commit migrated from https://github.com/dotnet/corefx/commit/380acc5a241bc67e498ad876f27f57b90a5acdfc
2016-09-08 11:23:57 -07:00
Stephen A. Imhoff 5c2533c980 Cleanup some tests, ensure combinatorial uses both directions.
Commit migrated from https://github.com/dotnet/corefx/commit/f01e6c3c7481ee124c76a0976191d068a0c306bb
2016-09-06 15:41:26 -07:00
Stephen Toub 3db33c3869 Reduce PLINQ tests outerloop from ~250s to ~85s
The tests have been overhauled and are in fairly decent shape, so there wasn't as much low-hanging fruit as in some of the other test libraries, but there are still a few notable places we can make improvements and others we can cut back without losing quality of coverage.

Changes:
- Even though some care had been taken to avoid it, at least one DegreeOfParallelismTests was taking an extra ~25s on my machine waiting for the thread pool to ramp up.  Fixed via the same helper used in other test libs.
- Removed ReadOnlyCollection as a source.  There are special PLINQ code paths for arrays, lists, ParallelEnumerable.Range, and custom partitioners, but not for other collection types, so I've commented out that source until such time as we do have such special cases.  This removes ~1/6th of the test cases and an equivalent amount of execution time.
- Improved throughput of the IntegerRangeSet helper, which is used in lots of tests and was a source of significant contention due to a lock used in the main Add method.  Replacing it with a SpinLock reduced execution time by ~10%.
- Removed ParallelEnumerable.Range as an "expander" in the SelectSelectManyTests.  The delegate is returning an IEnumerable, so subsequent operations performed on the expander aren't continuing the PLINQ execution and are instead starting a new one, making this essentially equivalent to (but more expensive than and duplicative of) the Enumerable.Range expander that already exists.
- Lowered outerloop default iteration count from 64K*ProcCount to 16K*ProcCount
- Lowered OrderByThenByTest outerloop iteration count from 32K to 16K, and removed the additional 1K iteration count being performed.


Commit migrated from https://github.com/dotnet/corefx/commit/2a75aefbe2cd8c951ac3cfb8ab2ea324847ae90c
2016-06-17 12:34:40 -04:00
Stephen Toub 06a541f137 Fix PLINQ test that fails rarely
The test was special casing a subset of the tests it needed to special case.


Commit migrated from https://github.com/dotnet/corefx/commit/08ce3eba109634b5a5e30ce894166aa41e35dd78
2016-05-19 12:28:05 -04:00
Stephen Toub 7b96d293ad PLINQ - Fewer/Faster tests (dotnet/corefx#8451)
Peome earlier discussion, I've cut down on the number and running time of the PLINQ tests.

The majority of the cases are still/should be covered, the reductions have generally been in sizes and source types for unordered tests.  Overall, OuterLoop tests on my machine are running about 40% faster. The number of tests is down, but the combinatorial tests still represent the majority of the count.

There are also some minor fixes here and there - dealing with an instance of integer overflow in a helper method, for example.  some earlier discussion, I've cut down on the number and running time of the PLINQ tests.

The majority of the cases are still/should be covered, the reductions have generally been in sizes and source types for unordered tests.  Overall, OuterLoop tests on my machine are running about 40% faster. The number of tests is down, but the combinatorial tests still represent the majority of the count.  There are also some minor fixes here and there - dealing with an instance of integer overflow in a helper method, for example.

Commit migrated from https://github.com/dotnet/corefx/commit/bfabc65b3123dee76406dfce6a0ce16a3b89b0c8
2016-05-11 12:35:17 -04:00
Stephen A. Imhoff 21cba5dacf More PLINQ tests (dotnet/corefx#5117)
* Add Concat combinatorial tests (ordered assumes sequential output).
* Add GroupJoin combinatorial tests.
* Add Join combinatorial tests.
* Add reverse-ordering combinatorial tests.

Commit migrated from https://github.com/dotnet/corefx/commit/67d719a6580ff810b9cd937671c2f0de57d829a4
2016-04-22 07:15:07 -04:00
Stephen A. Imhoff 588094af39 Clean up and expand PLINQ cancellation tests
* Add missing pre-cancelled combinatorial tests (output options only).

* Change Pre-cancelled tests to get token from Functions.AssertAlreadyCanceled.

* Add missing `Any` existence check pre-cancellation test.

* Wrap usual query cancellation to hide complexity.

* Add base helpers and sources for in-flight cancellation.

* Add Aggregate in-flight cancellation tests.

* Add All in-flight cancellation tests.

* Add Any in-flight cancellation tests.

* Add Average in-flight cancellation tests.

* Add Contains in-flight cancellation tests.

* Add Count/LongCount in-flight cancellation tests.

* Add ElementAt/ElementAtOrDefault in-flight cancellation tests.

* Add First/FirstOrDefault in-flight cancellation tests.

* Add ForAll in-flight cancellation tests.

* Add Last/LastOrDefault in-flight cancellation tests.

* Add Max in-flight cancellation tests.

* Add Min in-flight cancellation tests.

* Add SequenceEqual in-flight cancellation tests.

* Add Single/SingleOrDefault in-flight cancellation tests.

* Add Sum in-flight cancellation tests.

* Add ToArray in-flight cancellation tests.

* Add ToDictionary in-flight cancellation tests.

* Add ToList in-flight cancellation tests.

* Add ToLookup in-flight cancellation tests.

* Add foreach in-flight cancellation tests.

* Add cancellation for inner query of binaries.

* Remove basic pre-canceled token tests from `WithCancellationTests` (handled in combinatorial testing).

* Remove in-flight cancellation tests (handled in combinatorial and elsewhere)

* Move enumerator dispose test to GetEnumeratorTests

* Add/correct multiple WithCancellation test (original called WithDegreesOfParallelism)

* Add tests with not cancelable and pre canceled cancellation tokens.

* Remove SelectMany regression test (covered by existing SelectMany tests).

* Add tests for alternate (canceled) cancellation source throwing wrapped OCE.

* Add non-canceled thrown OCE test.

* Condense dealing with disposing the enumerator.
Original tests were liable to cause deadlock due to calling Dispose in a child thread (using an ordered source in an attempt to expand the tests made it a certainty).

* Update and expand ephemeral ODE test (potentially covered in combinatorial?).

* Update test for canceled-then-disposed enumerator.

* Re-use throws wrapped.

* Tweak comment, correct element counts.

* Replace regression test comment in SelectMany tests, tweak PE.Range expander

This comment was originally for a test in WithCancellationTests, but
that test didn't call WithCancellation at all.  Given the nature of the
original test, it was felt that _all_ SelectMany tests would check for
the failure; the original test was thus removed.

* Correct operation.

* Comparers sealed/readonly

* Add missing min/max func cancel combinations.

* Knock down delay time.

* Move (implicit in foreach) MoveNext cancellation test.

* Reduce counts for WithCancellation ProducerBlocked tests.

* Create new AssertThrows helper.
 - Cancellation-related throws provide default source
Switch to new cancellation throws.
 - GetEnumerator switched to internal methods to explicitly run over all sources.

* Split Single/SingleDefault cancellation tests.


Commit migrated from https://github.com/dotnet/corefx/commit/2d1d84d28e45d1d08179dc5ff7bbe4cacb1d5e64
2016-04-01 14:37:49 -04:00
Jon Hanna c23897f890 Fix several typos
Commit migrated from https://github.com/dotnet/corefx/commit/12a32bec60794664178886e6c1157677b883ded6
2016-03-19 16:28:22 +00:00
dotnet-bot b32ddb5d98 Deploy nameof throughout corefx in MemberData
Commit migrated from https://github.com/dotnet/corefx/commit/9c3156b9ada06b8e58ac53d48fc303500bf3e476
2016-02-18 23:58:15 -05:00
dotnet-bot 39d1eab950 Update licensing headers
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
2016-01-27 08:02:28 -08:00
Stephen A. Imhoff dac9a62890 Switch to OuterLoop attribute on class.
Commit migrated from https://github.com/dotnet/corefx/commit/5a5debb8fe10216668b31dc5722914d4ace6fa6f
2015-09-17 16:54:17 +09:00
Stephen A. Imhoff 0ace697d7c Expand GetEnumerator Tests.
Commit migrated from https://github.com/dotnet/corefx/commit/37fe1aa4acafa7e11d951a0dd694ac9b3c983db2
2015-09-17 16:54:16 +09:00
Stephen A. Imhoff f50b3b44ed Extract/expand failing combinatorial tests.
Add throw-on-enumeration source.


Commit migrated from https://github.com/dotnet/corefx/commit/aa26d27367f3283c86b502da640a7f87055b3f7a
2015-09-17 16:54:15 +09:00
Stephen A. Imhoff 0562be4aa5 Add missing PreCanceled OCE combination tests.
Commit migrated from https://github.com/dotnet/corefx/commit/df57e797c4288851b6b288aad63a1fff558dd0fa
2015-09-17 16:54:14 +09:00
Stephen A. Imhoff bf547ac81f Correct Test namespace.
Commit migrated from https://github.com/dotnet/corefx/commit/c9e780fd0d5f8868ba9975616ca895a6a17db79d
2015-09-17 16:54:05 +09:00
stephentoub b931aee629 Add missing license headers to .cs files
There are 77 .cs files in the repo lacking the standard license header we have on the other ~5400 .cs files.  This commit adds the missing ones.


Commit migrated from https://github.com/dotnet/corefx/commit/98157438d8790337f14341528f20d2f788a3279d
2015-07-21 18:52:55 -04:00
Clockwork-Muse e6de1ce75b Parcel out PlinqDelegateExceptions.cs contents, remove.
Update ExchangeTests

Update PlinqModesTests.

Remove file (contents covered more thoroughly by other tests).

Change Union tests to use custom Comparator similar to other set operations.

Add List to sources used for OuterLoop

Change how empty tests are handled.

Add tests for non-comparable types.

Add tests checking for duplicate compared items.

Describe behavior of common range sources

Describe Zip member data functions.

Describe Union member data functions.

Describe OrderBy member data functions

Describe Max/Min member data functions.


Commit migrated from https://github.com/dotnet/corefx/commit/1c3ecb33008d93d47b2e9a42480ebac50821b617
2015-07-11 09:26:58 +09:00
Clockwork-Muse 6952087b0e Initial cleanup of System.Linq.Parallel test.
Reorganize folders and files.
Update tests to use Theory and MemberData attributes.
Greatly expand source types used.
Add tests against pre-cancelled tokens and exceptions thrown
against output methods.


Commit migrated from https://github.com/dotnet/corefx/commit/6204cf2c3444f5c6aa42b08baaaca5c350dd4317
2015-06-08 07:06:07 +09:00