diff --git a/src/VisualStudio/Core/Test/Diagnostics/ExternalDiagnosticUpdateSourceTests.vb b/src/VisualStudio/Core/Test/Diagnostics/ExternalDiagnosticUpdateSourceTests.vb index 81aa089d9a347..476b0a5248a15 100644 --- a/src/VisualStudio/Core/Test/Diagnostics/ExternalDiagnosticUpdateSourceTests.vb +++ b/src/VisualStudio/Core/Test/Diagnostics/ExternalDiagnosticUpdateSourceTests.vb @@ -327,9 +327,11 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics source.AddNewErrors(projectId1, GetDiagnosticData(projectId1)) Await waiter.ExpeditedWaitAsync() + Dim numberOfUpdateCalls = 0 AddHandler source.BuildProgressChanged, Sub(o, progress) If progress = ExternalErrorDiagnosticUpdateSource.BuildProgress.Updated Then - Assert.Equal(1, source.GetBuildErrors().Length) + numberOfUpdateCalls += 1 + Assert.Equal(numberOfUpdateCalls, source.GetBuildErrors().Length) ElseIf progress = ExternalErrorDiagnosticUpdateSource.BuildProgress.Done Then Assert.Equal(2, source.GetBuildErrors().Length) End If