Skip to content

Commit 2e76c21

Browse files
committed
Parameterise load generator on_complete behaviour
If there's a health check configured, then "stop" is needed so the container remains healthy, otherwise "exit" can be used to stop FR.
1 parent a0e0d8b commit 2e76c21

16 files changed

Lines changed: 16 additions & 1 deletion

File tree

src/tests/multi-server/configs/freeradius/common/listen/load

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ listen load {
2424
max_backlog = $ENV{TEST_LOADGEN_MAX_BACKLOG}
2525
parallel = $ENV{TEST_LOADGEN_PARALLEL}
2626
max_requests = $ENV{TEST_LOADGEN_MAX_REQUESTS}
27-
on_complete = exit
27+
on_complete = $ENV{TEST_LOADGEN_COMPLETE}
2828
}
2929
}

src/tests/multi-server/environments/kafka.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ services:
105105
TEST_LOADGEN_STEP: "{{ loadgen.step }}"
106106
TEST_LOADGEN_MAX_BACKLOG: "{{ loadgen.max_backlog }}"
107107
TEST_LOADGEN_PARALLEL: "{{ loadgen.parallel }}"
108+
TEST_LOADGEN_COMPLETE: "{{ loadgen.complete }}"
108109
#
109110
# Hard cap on packets emitted. Tests that want the emit
110111
# count to equal the consume count default this to

src/tests/multi-server/tests/accept/5min.test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ loadgen:
1111
parallel: 1
1212
max_backlog: 1000
1313
repeat: "no"
14+
complete: "exit"
1415

1516
# Test framework
1617
test_timeout: 350

src/tests/multi-server/tests/kafka-produce-reconnect/short.ci.test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ loadgen:
2929
step: 10
3030
parallel: 1
3131
max_backlog: 1000
32+
complete: "stop"
3233

3334
# 30s x 10pps = 300, but num_messages caps at 200 so proto_load
3435
# stops at 200 emitted. Consumer expects exactly 200. If the

src/tests/multi-server/tests/kafka-produce/heavy.test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ loadgen:
1616
step: 500
1717
parallel: 4
1818
max_backlog: 20000
19+
complete: "stop"
1920

2021
# 2 * (500 + 1000 + 1500 + 2000) = 10000
2122
expected_messages: 10000

src/tests/multi-server/tests/kafka-produce/short.ci.test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ loadgen:
1919
#
2020
parallel: 5
2121
max_backlog: 1000
22+
complete: "stop"
2223

2324
#
2425
# Expected message count at the consumer. Must equal the total

src/tests/multi-server/tests/ldap/5min.test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ loadgen:
1111
parallel: 1
1212
max_backlog: 1000
1313
repeat: "no"
14+
complete: "exit"
1415

1516
# Test framework
1617
test_timeout: 350

src/tests/multi-server/tests/ldap/short.ci.test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ loadgen:
1111
parallel: 1
1212
max_backlog: 1000
1313
repeat: "no"
14+
complete: "exit"
1415

1516
# Test framework
1617
test_timeout: 125

src/tests/multi-server/tests/mysql/5min.test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ loadgen:
1111
parallel: 1
1212
max_backlog: 1000
1313
repeat: "no"
14+
complete: "exit"
1415

1516
# Test framework
1617
test_timeout: 350

src/tests/multi-server/tests/mysql/short.ci.test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ loadgen:
1111
parallel: 1
1212
max_backlog: 1000
1313
repeat: "no"
14+
complete: "exit"
1415

1516
# Test framework
1617
test_timeout: 125

0 commit comments

Comments
 (0)