Example #1
0
        public void LockTest_GlobalLock_PipLockMutallyExclusive()
        {
            Setup();
            var lockManager = new LockManager();

            // Global lock and pip lock are mutually exclusive
            TestMutuallyExclusive(() => lockManager.AcquireGlobalExclusiveLock(), () => lockManager.AcquireLock(new PipId(20)));
        }
Example #2
0
        public void LockTest_GlobalLock_PathLockMutallyExclusive()
        {
            Setup();
            var lockManager = new LockManager();

            // Global lock and path lock are mutually exclusive
            var copyFile = CreateCopyFile(CreateSourceFile(), CreateOutputFileArtifact());

            TestMutuallyExclusive(() => lockManager.AcquireGlobalExclusiveLock(), () => lockManager.AcquirePathAccessLock(copyFile));
        }