Skip to content

Commit

Permalink
Remove spurious code in xk6-disruptor examples (#1247)
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Chacin <[email protected]>
  • Loading branch information
pablochacin authored Jul 5, 2023
1 parent 628f9c4 commit a629c40
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ export default function () {
select: { labels: { "app.kubernetes.io/name": "my-app" } },
});

// Check that there is at least one target
const targets = disruptor.targets();
if (targets.length === 0) {
throw new Error("expected list to have one target");
}

// Disrupt the targets by injecting HTTP faults into them for 30 seconds
const fault = {
averageDelay: 500,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ const fault = {

export default function () {
const disruptor = new PodDisruptor(selector);
const targets = disruptor.targets();
if (targets.length != 1) {
throw new Error('expected list to have one target');
}

disruptor.injectHTTPFaults(fault, '30s');
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ const fault = {

export default function () {
const disruptor = new ServiceDisruptor('nginx', 'default');
const targets = disruptor.targets();
if (targets.length != 1) {
throw new Error('expected list to have one target');
}

disruptor.injectHTTPFaults(fault, '30s');
}
```
Expand Down

0 comments on commit a629c40

Please sign in to comment.