Fix flaky tests.
This commit is contained in:
parent
c8da6e0628
commit
aacb7d7453
|
|
@ -832,13 +832,15 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
|
||||||
"",
|
"",
|
||||||
"");
|
"");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Assert.Equal(2, onStartingCallCount1);
|
Assert.Equal(2, onStartingCallCount1);
|
||||||
// The second OnStarting callback should not be called since the first failed.
|
// The second OnStarting callback should not be called since the first failed.
|
||||||
Assert.Equal(0, onStartingCallCount2);
|
Assert.Equal(0, onStartingCallCount2);
|
||||||
Assert.Equal(2, testLogger.ApplicationErrorsLogged);
|
Assert.Equal(2, testLogger.ApplicationErrorsLogged);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[MemberData(nameof(ConnectionFilterData))]
|
[MemberData(nameof(ConnectionFilterData))]
|
||||||
|
|
@ -882,13 +884,13 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
|
||||||
"",
|
"",
|
||||||
"Hello World");
|
"Hello World");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// All OnCompleted callbacks should be called even if they throw.
|
// All OnCompleted callbacks should be called even if they throw.
|
||||||
Assert.Equal(2, testLogger.ApplicationErrorsLogged);
|
Assert.Equal(2, testLogger.ApplicationErrorsLogged);
|
||||||
Assert.True(onCompletedCalled1);
|
Assert.True(onCompletedCalled1);
|
||||||
Assert.True(onCompletedCalled2);
|
Assert.True(onCompletedCalled2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[MemberData(nameof(ConnectionFilterData))]
|
[MemberData(nameof(ConnectionFilterData))]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue