Set the first interval to 10 milleseconds, not just one. Then read
the bucket.count again after changing the interval, the callback may
fire a few times while we execute the Assert() and t.Change() callls.
2009-10-20 Sebastien Pouliot <[email protected]>
* Timer.cs: Always call Init from every constructors to avoid
duplicate checks. Fix validations on different dueTime and period
(ctor and Change methods). Seal private TimerComparer class and
avoid multiple (identical) casts in its Compare method. Seal
private Scheduler class.
In Test/System.Threading:
2009-10-20 Sebastien Pouliot <[email protected]>
* TimerTest.cs: Add more validation tests
svn path=/trunk/mcs/; revision=144466
test. Numbered asserts. Minor code formatting updates. Removed obsolete
comment on class.
* ThreadTest.cs: Use Assert.Fail for tests that fail on the Mono
runtime only when these tests are being executed on the Mono runtime.
svn path=/trunk/mcs/; revision=105788
* TimerTest.cs: Disable this test. It seems to be completely
unreliable, likely because it depends on a race. See comment in
the source.
svn path=/trunk/mcs/; revision=40780