File tree Expand file tree Collapse file tree 3 files changed +0
-16
lines changed
src/data/markdown/docs/40 xk6-disruptor Expand file tree Collapse file tree 3 files changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,6 @@ export default function () {
30
30
select: { labels: { " app.kubernetes.io/name" : " my-app" } },
31
31
});
32
32
33
- // Check that there is at least one target
34
- const targets = disruptor .targets ();
35
- if (targets .length === 0 ) {
36
- throw new Error (" expected list to have one target" );
37
- }
38
-
39
33
// Disrupt the targets by injecting HTTP faults into them for 30 seconds
40
34
const fault = {
41
35
averageDelay: 500 ,
Original file line number Diff line number Diff line change @@ -43,11 +43,6 @@ const fault = {
43
43
44
44
export default function () {
45
45
const disruptor = new PodDisruptor (selector);
46
- const targets = disruptor .targets ();
47
- if (targets .length != 1 ) {
48
- throw new Error (' expected list to have one target' );
49
- }
50
-
51
46
disruptor .injectHTTPFaults (fault, ' 30s' );
52
47
}
53
48
```
Original file line number Diff line number Diff line change @@ -33,11 +33,6 @@ const fault = {
33
33
34
34
export default function () {
35
35
const disruptor = new ServiceDisruptor (' nginx' , ' default' );
36
- const targets = disruptor .targets ();
37
- if (targets .length != 1 ) {
38
- throw new Error (' expected list to have one target' );
39
- }
40
-
41
36
disruptor .injectHTTPFaults (fault, ' 30s' );
42
37
}
43
38
```
You can’t perform that action at this time.
0 commit comments