Skip to content

Commit

Permalink
add distributor block test with regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
okv committed Feb 6, 2020
1 parent 0c89fda commit 6a8f719
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/distributor/blocking.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,22 @@ describe('Distributor blocking with max 2 executors count', function() {
itRunSequentialProjects();
});

describe(
'should run project1, then 2, when 2 blocked by 1 using regexp',
function() {
before(function() {
projects = [{
name: 'project1'
}, {
name: 'project2',
blockedBy: [/project1/]
}];
});

itRunSequentialProjects();
}
);

describe('should run project1, then 2, when 1 blocks 2', function() {
before(function() {
projects = [{
Expand All @@ -154,6 +170,22 @@ describe('Distributor blocking with max 2 executors count', function() {
itRunSequentialProjects();
});

describe(
'should run project1, then 2, when 1 blocks 2 using regexp',
function() {
before(function() {
projects = [{
name: 'project1',
blocks: [/project2/]
}, {
name: 'project2'
}];
});

itRunSequentialProjects();
}
);

describe(
'should run 1, 2 in parallel, when 1 block 3, 2 blocked by 3',
function() {
Expand Down

0 comments on commit 6a8f719

Please sign in to comment.