google-code-export / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

GUI throws System.InvalidOperationException on repeated test #636

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a VB Class Library project with the test given in additional
information, and compile.
2. Run test in Gallio Icarus GUI

What is the expected output? What do you see instead?
Test should run, one assert might fail

Unhandled Exception Dialog appears with additional information of:

System.InvalidOperationException: Collection was modified; enumeration
operation may not execute.
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate
method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at
System.Windows.Forms.WindowsFormsSynchronizationContext.Send(SendOrPostCallback
d, Object state)
   at
Gallio.UI.Common.Synchronization.SynchronizationContext.Send(SendOrPostCallback
sendOrPostCallback, Object state) in c:\RelEng\Projects\MbUnit
v3.1\Work\src\Gallio\Gallio.UI\Common\Synchronization\SynchronizationContext.cs:
line
32
   at Gallio.Icarus.Observable`1.set_Value(T value)
   at Gallio.Icarus.Controllers.TestResultsController.CountResults()
   at
Gallio.Common.Policies.EventHandlerPolicy.SafeInvoke[T](EventHandler`1
handlerChain, Object sender, T e) in c:\RelEng\Projects\MbUnit
v3.1\Work\src\Gallio\Gallio\Common\Policies\EventHandlerPolicy.cs:line 69
Reported by: 
UnhandledExceptionPolicy
   at
Gallio.Icarus.Controllers.TestController.<>c__DisplayClass19.<DoWithTestRunner>b
__13()
   at
Gallio.UI.ProgressMonitoring.TaskManager.<>c__DisplayClass2.<BackgroundTask>b__1
(Object
cb) in c:\RelEng\Projects\MbUnit
v3.1\Work\src\Gallio\Gallio.UI\ProgressMonitoring\TaskManager.cs:line 84
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(
TryCode
code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
   at
System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPool
WaitCallback
tpWaitCallBack)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object
state)

What version of the product are you using? On what operating system?
3.1 build 397 on Windows 7 x64 (Guest VM of Server 2008 R2 & Hyper-V)

Please provide any additional information below.
<Test(), Repeat(2000)>
    Public Sub TestRandom()
        Dim rnd As New Random(My.Computer.Clock.TickCount)
        Dim num As Integer = rnd.Next(366) * -1
        Assert.Between(num, -366, -1)
    End Sub

Original issue reported on code.google.com by bender.oh@googlemail.com on 12 Mar 2010 at 3:43

GoogleCodeExporter commented 9 years ago

Original comment by grahamr...@gmail.com on 30 Mar 2010 at 4:29