-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.ServiceProcess.Tests.ServiceBaseTests.TestOnStartThenStop failed in CI #23247
Comments
same in System.ServiceProcess.Tests.ServiceControllerTests/ConstructWithServiceName_ToUpper
something is flaky. |
same in System.ServiceProcess.Tests.ServiceControllerTests/ConstructWithServiceName_ToUpper |
Test: System.ServiceProcess.Tests.ServiceControllerTests.ConstructWithServiceName_ToUpper failed with same issue. |
Following test: System.ServiceProcess.Tests.ServiceControllerTests/ConstructWithServiceName failed with same issue, detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20171025.04/workItem/System.ServiceProcess.ServiceController.Tests/analysis/xunit/System.ServiceProcess.Tests.ServiceControllerTests~2FConstructWithServiceName The test System.InvalidOperationException : Cannot open bdc32291-dc03-46f0-b1ba-5fb3c91922c0 service on computer '.'.\r
Build : Master - 20171025.04 (Core Tests)
|
Possibly related to two test classes uninstalling services at about the same time, see timestamps, although that wasn't noted above
|
It's always in
getting We can see from the logging that even though this is happening about the same time, the service names they are deleting are different. We already added logging to check we weren't getting called twice for hte same service, and it's not firing. My guess is that the OpenService call is not robust when called concurrently. Let's just ignore this failure. @Anipik can you please add a catch thus: using (ServiceController svc = new ServiceController(ServiceName))
{
if (svc.Status != ServiceControllerStatus.Stopped)
{
try
{
svc.Stop();
}
catch (InvalidOperationException) // OpenService does not seem robust to concurrent calls
{
ServiceName == null;
return;
}
svc.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(30));
}
} |
Failed test: System.ServiceProcess.Tests.ServiceBaseTests.TestOnStartThenStop
Detail: https://ci.dot.net/job/dotnet_corefx/job/master/job/outerloop_netcoreapp_win7_release/lastCompletedBuild/testReport/System.ServiceProcess.Tests/ServiceBaseTests/TestOnStartThenStop/
Configuration: OuterLoop_netcoreapp_win7_release
MESSAGE:
STACK TRACE:
The text was updated successfully, but these errors were encountered: