Better locking
parent
d4c5218b39
commit
7af054a390
|
|
@ -3,9 +3,12 @@ import { Cli } from '../../cli/cli';
|
|||
import setups from './cloud-runner-suite.test';
|
||||
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import CloudRunnerOptions from '../cloud-runner-options';
|
||||
|
||||
describe('Cloud Runner Locking', () => {
|
||||
setups();
|
||||
it('Responds', () => {});
|
||||
if (CloudRunnerOptions.cloudRunnerTests) {
|
||||
it(`simple locking flow`, async () => {
|
||||
Cli.options.retainWorkspaces = true;
|
||||
const newWorkspaceName = `test-workspace-${uuidv4()}`;
|
||||
|
|
@ -23,7 +26,8 @@ describe('Cloud Runner Locking', () => {
|
|||
await SharedWorkspaceLocking.ReleaseWorkspace(newWorkspaceName, runId);
|
||||
const locks = await SharedWorkspaceLocking.GetAllLocks(newWorkspaceName);
|
||||
expect(locks.length === 1).toBeTruthy();
|
||||
const isExpectedLockedAfterReleasing = (await SharedWorkspaceLocking.IsWorkspaceLocked(newWorkspaceName)) === false;
|
||||
const isExpectedLockedAfterReleasing =
|
||||
(await SharedWorkspaceLocking.IsWorkspaceLocked(newWorkspaceName)) === false;
|
||||
expect(isExpectedLockedAfterReleasing).toBeTruthy();
|
||||
}, 150000);
|
||||
it('Locking', async () => {
|
||||
|
|
@ -48,4 +52,5 @@ describe('Cloud Runner Locking', () => {
|
|||
)}`,
|
||||
);
|
||||
}, 3000000);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue