enables test (#34911)
authorAnirudh Agnihotry <anirudhagnihotry098@gmail.com>
Mon, 13 Apr 2020 22:34:41 +0000 (15:34 -0700)
committerGitHub <noreply@github.com>
Mon, 13 Apr 2020 22:34:41 +0000 (15:34 -0700)
src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs

index b472dd970977eb83f3aab1ac90efc961e1c53e60..f000baf317ce67e989a5a96bcc08c4aea2a5bc24 100644 (file)
@@ -81,7 +81,6 @@ namespace System.ServiceProcess.Tests
             controller.WaitForStatus(ServiceControllerStatus.Stopped);
         }
 
-        [ActiveIssue("https://github.com/dotnet/runtime/issues/34801")]
         [ConditionalFact(nameof(IsProcessElevated))]
         public void TestOnStartWithArgsThenStop()
         {
@@ -94,10 +93,9 @@ namespace System.ServiceProcess.Tests
             controller.Start(new string[] { "StartWithArguments", "a", "b", "c" });
             _testService.Client = null;
             _testService.Client.Connect();
+            Assert.Equal((int)(PipeMessageByteCode.Connected), _testService.GetByte());
 
-            // There is no definite order between start and connected when tests are running on multiple threads.
-            // In this case we dont care much about the order, so we are just checking whether the appropiate bytes have been sent.
-            Assert.Equal((int)(PipeMessageByteCode.Connected | PipeMessageByteCode.Start), _testService.GetByte() | _testService.GetByte());
+            Assert.Equal((int)(PipeMessageByteCode.Start), _testService.GetByte());           
             controller.WaitForStatus(ServiceControllerStatus.Running);
 
             controller.Stop();