예제 #1
0
파일: ServiceTests.cs 프로젝트: yyqyu/GVFS
        public void ServiceCopiesNonInboxNativeDll()
        {
            if (IsProjFSInbox())
            {
                Assert.Ignore("Skipping test, ProjFS is inbox");
            }

            if (!GVFSTestConfig.TestGVFSOnPath)
            {
                Assert.Ignore("Skipping test, test only enabled when --test-gvfs-on-path is set");
            }

            NativeLibPath.ShouldBeAFile(this.fileSystem);
            this.Enlistment.UnmountGVFS();
            this.fileSystem.DeleteFile(NativeLibPath);
            NativeLibPath.ShouldNotExistOnDisk(this.fileSystem);
            GVFSServiceProcess.StopService();
            GVFSServiceProcess.StartService();

            int count = 0;

            while (!this.fileSystem.FileExists(NativeLibPath) && count < 10)
            {
                Thread.Sleep(1000);
                ++count;
            }

            NativeLibPath.ShouldBeAFile(this.fileSystem);
            this.Enlistment.MountGVFS();
        }
예제 #2
0
        public void ServiceStartsPrjFltService()
        {
            this.Enlistment.UnmountGVFS();
            StopPrjFlt();
            GVFSServiceProcess.StopService();
            GVFSServiceProcess.StartService();

            ServiceController controller = new ServiceController("prjflt");

            controller.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(10));
            controller.Status.ShouldEqual(ServiceControllerStatus.Running);

            this.Enlistment.MountGVFS();
        }
예제 #3
0
파일: ServiceTests.cs 프로젝트: yyqyu/GVFS
        public void ServiceStartsPrjFltService()
        {
            if (!GVFSTestConfig.TestGVFSOnPath)
            {
                Assert.Ignore("Skipping test, test only enabled when --test-gvfs-on-path is set");
            }

            this.Enlistment.UnmountGVFS();
            StopPrjFlt();
            GVFSServiceProcess.StopService();
            GVFSServiceProcess.StartService();

            ServiceController controller = new ServiceController("prjflt");

            controller.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(10));
            controller.Status.ShouldEqual(ServiceControllerStatus.Running);

            this.Enlistment.MountGVFS();
        }
 private void RestartService()
 {
     GVFSServiceProcess.StopService();
     GVFSServiceProcess.StartService();
 }