71 Commits
Author SHA1 Message Date
Alexander Köplinger 1a89bfde05 [System.Xml/System.ServiceModel/Dataflow] Use more specific type in assert
Apparently nunitlite is more strict here so we need to allow subclasses as well
and test for the more specific type.
2016-10-29 14:09:39 +02:00
Marcos Henrich 863dc73d19 [bcl] Add NUnitHelper.cs with API not in nunit-lite
NUnitHelper.cs adds CollectionAssert, FileAssert, StringAssert.

Also adds AssertHelper class with methods that are not part of nunitlite
Assert class.
2016-10-29 14:09:33 +02:00
Alexander Köplinger 9d40383ca9 [Dataflow] Bump timeouts in TransformBlockTest.DeferredUsage
It failed a couple of times according to the babysitter logs with the following error:

```
MESSAGE:
Expected and actual are both <System.Int32[10]>
  Values differ at index [1]
  Expected: -1
  But was:  0
```

Bump timeouts a little bit to see if this helps.
2016-09-04 20:11:36 +02:00
Alexander Köplinger d17c5407a4 [System.Threading.Tasks.Dataflow] Replace implementation with CoreFx version
We were seeing some random test failures on Jenkins with our Dataflow implementation.
Replacing it with Microsoft's CoreFx version fixed those and makes us more compatible.

While we'd ideally not ship this assembly at all with Mono (it doesn't ship with .NET),
we shipped it in the past and as such people might rely on it so we can't remove it.

The CoreFx commit this version was taken is 905a1940bcda0afdca2f14ceb2b0161ebc4d1d02.
2015-11-16 17:17:02 +01:00
Alexander Köplinger 0f6b85f08b [Dataflow] Fix flaky tests by bumping timeouts
We were seeing random Dataflow tests fail on Jenkins from time to time.
I managed to reproduce the BroadcastBlockTest.CloningTest and WriteOnceBlockTest.CloningTest
fail on my machine by generating CPU load and running those test in a while(true).

Bumping the timeouts from 100ms -> 1s fixed the flakiness for me, so I went ahead and
opportunistically bumped all such small timeouts throughout the testsuite.
2015-11-11 22:40:28 +01:00
Ludovic Henry f8ea020356 [tests] Increase timeout before failing 2015-10-26 15:50:25 +00:00
Alexander Köplinger 2b5da76670 [Dataflow] Disable flaky FaultExecutingConsume () test
It fails randomly on Jenkins and my own CI. To reproduce, just wrap the body of the test in while(true) and run for a few minutes.
I tested on MS.NET as well and it fails the same way there, so it's not Mono's implementation of Dataflow.

Filed https://bugzilla.xamarin.com/show_bug.cgi?id=27757 for tracking.
2015-03-08 21:51:48 +01:00
Alex Rønne Petersen bc876c2427 [bcl] Remove all uses of Thread.Volatile{Read,Write}.
These methods are broken, misleading, and generally harmful. Always prefer the
`Volatile` class over these to make intent clear and to get sensible semantics.

http://blog.alexrp.com/2014/03/30/dot-net-atomics-and-memory-model-semantics/
2014-12-03 19:19:51 +01:00
Rodrigo Kumpera 9015a7f609 Improve the reliability and error reporting of the TPL Dataflow test suite. 2013-05-30 15:43:25 -04:00
Petr Onderka aa8665f1a2 Fixed race condition in race condition test 2012-08-20 00:09:21 +02:00
Petr Onderka 96b8ce459b Correctly implemented Choose() 2012-08-20 00:08:33 +02:00
Petr Onderka 2ca9ed1f9b Fixed completion of PropagatorWrapperBlock 2012-08-20 00:08:01 +02:00
Petr Onderka 53cfcfa518 Some tests need more time 2012-08-20 00:07:14 +02:00
Petr Onderka 3233cb6b67 Work around issue with old NUnit and comparing collections 2012-08-20 00:06:57 +02:00
Petr Onderka 157a7e48da Don't cancel unstarted Tasks on cancellation
Unstarted Tasks can't be cancelled, because they have to
correctly modify degreeOfParallelism.
2012-08-20 00:06:42 +02:00
Petr Onderka 3d1fdc2b77 Fixed unit test to work with old NUnit 2012-08-20 00:06:26 +02:00
Petr Onderka 6033bab1ac Handle consumeToAccept with MaxNumberOfGroups correctly 2012-08-20 00:06:11 +02:00
Petr Onderka a05897bdda Store multiple exceptions in Completion correctly 2012-08-20 00:05:55 +02:00
Petr Onderka c0eae466df Added test for MaxMessages with BroadcastBlock 2012-08-20 00:05:39 +02:00
Petr Onderka 8e6723b148 consumeToAccept shouldn't reserve 2012-08-20 00:05:24 +02:00
Petr Onderka a51689aeaa Make sure cancellation behaves the same as faulting wrt output queue 2012-08-20 00:05:08 +02:00
Petr Onderka c5a7eec7c0 Implemented execution block ctors for async actions 2012-08-20 00:04:52 +02:00
Petr Onderka f5aa9b18cc Implemented NullTarget() 2012-08-20 00:04:35 +02:00
Petr Onderka 83ee01d56b Fixed race condition in OfferMessage() 2012-08-20 00:03:47 +02:00
Petr Onderka bb1d630ad0 Forgot to use AssertEx 2012-08-20 00:03:15 +02:00
Petr Onderka 956fe3e589 Check for null target in ConsumeMessage()
Previously, the correct exception was thrown later on,
but only by accident.
2012-08-20 00:02:27 +02:00
Petr Onderka b42d1d23cc Only reserved can be consumed after fault 2012-08-20 00:02:11 +02:00
Petr Onderka d8a84d05c7 Implemented OutputAvailableAsync() 2012-08-20 00:01:21 +02:00
Petr Onderka 6dc84bab1d Implemented LinkTo() with predicate 2012-08-20 00:00:32 +02:00
Petr Onderka e09671aeec Fixed sending from WriteOnceBlock 2012-08-20 00:00:17 +02:00
Petr Onderka 1b75b734b5 Fixed sending from BroadcastBlock 2012-08-20 00:00:02 +02:00
Petr Onderka 0488ecec3c Corrected Receive() and ReceiveAsync() 2012-08-19 23:59:47 +02:00
Petr Onderka efa8ac1e1b Valid header can't have id 0 2012-08-19 23:59:32 +02:00
Petr Onderka 460864bd02 Implemented SendAsync() 2012-08-19 23:59:17 +02:00
Petr Onderka 37cdae3d3e Release postponed messages after Complete() 2012-08-19 23:59:01 +02:00
Petr Onderka f0513a7ba7 Handle completion correctly in Receive() 2012-08-19 23:58:31 +02:00
Petr Onderka 2742f4fdc8 Verify arguments in public methods 2012-08-19 23:57:39 +02:00
Petr Onderka 1789aca42b Negative header ids should be valid 2012-08-19 23:56:47 +02:00
Petr Onderka c005de6f4f Made tests compatible with NUnit 2.4 2012-08-19 23:56:23 +02:00
Petr Onderka 7a0de2d404 Added support for MaxNumberOfGroups 2012-08-19 23:55:25 +02:00
Petr Onderka f9d6665916 Fixed completion of JoinTargets 2012-08-19 23:55:14 +02:00
Petr Onderka 70eb1606a6 No need to use .Net 4.5-specific methods 2012-08-19 23:55:04 +02:00
Petr Onderka 24f9b377ba Fixed tests, so that they work under MS .Net
Also a small change in ToString().
2012-08-19 23:54:43 +02:00
Petr Onderka 32564dbdff Fixed bug in unit test 2012-08-19 23:54:32 +02:00
Petr Onderka 70dd858e42 Fixed non-greedy blocks with BoundedCapacity 2012-08-19 23:44:06 +02:00
Petr Onderka 8f537c6c43 Test TriggerBatch() when the block is empty 2012-08-19 23:44:04 +02:00
Petr Onderka c5f365a7d7 Added support for Greedy 2012-08-19 23:42:50 +02:00
Petr Onderka f2a8e7e1eb Added support for PropagateCompletion 2012-08-19 23:42:49 +02:00
Petr Onderka b7d32ce8b3 Added support for MaxMessages 2012-08-19 23:42:47 +02:00
Petr Onderka 8569907ddb Fixed bug in unit test 2012-08-19 23:42:46 +02:00