Skip to content

Commit d0ab4cb

Browse files
elianalftempate
andauthored
Tests to stress reliability (#425)
* Stress tests using advanced config example Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Modify stress cloud test Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Fix python scripts Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Remove multi router local test Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Change multi routers local test in multi routers repeter test Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Update comments and graphs Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Apply suggestions Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Apply suggestions Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> * Fixes Signed-off-by: tempate <danieldiaz@eprosima.com> * Apply suggestions Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --------- Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> Signed-off-by: tempate <danieldiaz@eprosima.com> Co-authored-by: tempate <danieldiaz@eprosima.com>
1 parent 3ab3102 commit d0ab4cb

29 files changed

Lines changed: 881 additions & 9 deletions

ddsrouter_test/compose/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ set(TESTS
6969
discovery_trigger/any/reader
7070
discovery_trigger/any/writer
7171

72-
stress/repeater_mixed_data_sizes
72+
stress/cloud/reliable
73+
stress/repeater/mixed_data_sizes
74+
stress/repeater/reliable
75+
stress/simple/reliable
7376
)
7477

7578
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test_cases DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

ddsrouter_test/compose/scripts/execute_and_validate_subscriber.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ def _subscriber_parse_output(stdout, stderr):
146146
for line in stdout.splitlines():
147147
if msgs_regex_basic.match(line) or msgs_regex_adv.match(line):
148148
filtered_data['messages'].append(line)
149-
150149
elif match_regex.match(line):
151150
filtered_data['matches'] += 1
152151

Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
# Test description:
2+
# This test simulates a busy network:
3+
# If we set up 4 routers, 2 edges and 2 clouds (the cloud router will forward the
4+
# messages from 1 to 2 and the edge will forward them to DomainParticipants), 12
5+
# best-effort publishers sending large messages (100kB, 200kB, 300kB, 400kB) to
6+
# 3 best-effort subscribers on 3 different topics and one reliable publisher
7+
# sending messages to a reliable subscriber, at 10Hz. The test checks if all the
8+
# messages are forwarded from the reliable publisher to the reliable subscriber.
9+
#
10+
# Test architecture:
11+
12+
# ┌───────────────────────────────────────────────────────────────┐
13+
# │ cloud_edge_net │
14+
# │ ┌──────────────────┐ ┌──────────────────┐ │
15+
# │ │ ddsrouter_cloud_1◄─────────► ddsrouter_cloud_2│ │
16+
# │ │ (wan + wan) │ │ (wan + wan) │ │
17+
# │ └────────▲─────────┘ └────────┬─────────┘ │
18+
# │ │ │ │
19+
# │ ┌─────────┴──────────┐ ┌───────────▼────────┐ │
20+
# │ │ ddsrouter_edge_1 │ │ ddsrouter_edge_2 │ │
21+
# │ │ │ │ │ │
22+
# │ │ (edge_1_net+wan) │ │ (edge_1_net+wan) │ │
23+
# └───────┼────────────────────┼─────┼────────────────────┼───────┘
24+
# ┌───────┼────────────────────┼─┐ ┌─┼────────────────────┼───────┐
25+
# │ └───────────▲─▲─▲─▲──┘ │ │ └──┬─┬─┬─┬───────────┘ │
26+
# │ │ │ │ │ │ │ │ │ │ │ │
27+
# │ Domain 103 │ │ │ │ │ │ │ │ │ │ Domain 105 │
28+
# │ ┌───────────────┐ │ │ │ │ │ │ │ │ │ │ │
29+
# │ │ publisher_1 │ │ │ │ │ │ │ │ │ │ │ ┌───────────────┐ │
30+
# │ │ ... ├─┘ │ │ │ │ │ │ │ │ │ │ subscriber_1 │ │
31+
# │ │ publisher_4 │ │ │ │ │ │ │ │ │ └─► (edge_2_net) │ │
32+
# │ │ (edge_1_net) │ │ │ │ │ │ │ │ │ └───────────────┘ │
33+
# │ └───────────────┘ │ │ │ │ │ │ │ │ │
34+
# │ │ │ │ │ │ │ │ │ ┌───────────────┐ │
35+
# │ ┌───────────────┐ │ │ │ │ │ │ │ │ │ subscriber_2 │ │
36+
# │ │ publisher_5 │ │ │ │ │ │ │ │ └───► (edge_2_net) │ │
37+
# │ │ ... │ │ │ │ │ │ │ │ └───────────────┘ │
38+
# │ │ publisher_8 ├───┘ │ │ │ │ │ │ │
39+
# │ │ (edge_1_net) │ │ │ │ │ │ │ ┌───────────────┐ │
40+
# │ └───────────────┘ │ │ │ │ │ │ │ subscriber_3 │ │
41+
# │ │ │ │ │ │ └─────► (edge_2_net) │ │
42+
# │ ┌───────────────┐ │ │ │ │ │ └───────────────┘ │
43+
# │ │ publisher_9 │ │ │ │ │ │ │
44+
# │ │ ... │ │ │ │ │ │ ┌───────────────────┐ │
45+
# │ │ publisher_12 ├─────┘ │ │ │ │ │subscriber_reliable│ │
46+
# │ │ (edge_1_net) │ │ │ │ └───► (edge_2_net) │ │
47+
# │ └───────────────┘ │ │ │ └───────────────────┘ │
48+
# │ │ │ │ │
49+
# │ ┌──────────────────┐ │ │ │ │
50+
# │ │publisher_reliable│ │ │ │ │
51+
# │ │ (edge_1_net) ├────┘ │ │ │
52+
# │ └──────────────────┘ │ │ │
53+
# └──────────────────────────────┘ └──────────────────────────────┘
54+
55+
services:
56+
57+
# ROUTERS
58+
ddsrouter_cloud_1:
59+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
60+
container_name: ddsrouter_cloud_1
61+
networks:
62+
- cloud_edge_net
63+
volumes:
64+
- ./ddsrouter_cloud_1.yaml:/config.yaml
65+
command: ddsrouter -c /config.yaml --timeout 15
66+
67+
ddsrouter_cloud_2:
68+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
69+
container_name: ddsrouter_cloud_2
70+
depends_on:
71+
- ddsrouter_cloud_1
72+
networks:
73+
- cloud_edge_net
74+
volumes:
75+
- ./ddsrouter_cloud_2.yaml:/config.yaml
76+
command: ddsrouter -c /config.yaml --timeout 15
77+
78+
ddsrouter_edge_1:
79+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
80+
container_name: ddsrouter_edge_1
81+
depends_on:
82+
- ddsrouter_cloud_1
83+
networks:
84+
- cloud_edge_net
85+
- edge_1_net
86+
volumes:
87+
- ./ddsrouter_edge_1.yaml:/config.yaml
88+
command: ddsrouter -c /config.yaml --timeout 15
89+
90+
ddsrouter_edge_2:
91+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
92+
container_name: ddsrouter_edge_2
93+
depends_on:
94+
- ddsrouter_cloud_2
95+
networks:
96+
- cloud_edge_net
97+
- edge_2_net
98+
volumes:
99+
- ./ddsrouter_edge_2.yaml:/config.yaml
100+
command: ddsrouter -c /config.yaml --timeout 15
101+
102+
# SUBSCRIBERS
103+
subscriber_reliable:
104+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
105+
container_name: subscriber_reliable
106+
depends_on:
107+
- ddsrouter_edge_2
108+
networks:
109+
- edge_2_net
110+
volumes:
111+
- ../../../../scripts:/scripts
112+
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --samples 10 --timeout 15 --args "--samples 10 --domain 105 --topic LargeDataTopic_reliable --reliable"
113+
114+
subscriber_1:
115+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
116+
container_name: subscriber_1
117+
depends_on:
118+
- ddsrouter_edge_2
119+
networks:
120+
- edge_2_net
121+
volumes:
122+
- ../../../../scripts:/scripts
123+
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --samples 10 --timeout 10 --allow-duplicates -1 --args "--samples 10 --domain 105 --topic LargeDataTopic_1"
124+
125+
subscriber_2:
126+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
127+
container_name: subscriber_2
128+
depends_on:
129+
- ddsrouter_edge_2
130+
networks:
131+
- edge_2_net
132+
volumes:
133+
- ../../../../scripts:/scripts
134+
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --samples 10 --timeout 10 --allow-duplicates -1 --args "--samples 10 --domain 105 --topic LargeDataTopic_2"
135+
136+
137+
subscriber_3:
138+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
139+
container_name: subscriber_3
140+
depends_on:
141+
- ddsrouter_edge_2
142+
networks:
143+
- edge_2_net
144+
volumes:
145+
- ../../../../scripts:/scripts
146+
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --samples 10 --timeout 10 --allow-duplicates -1 --args "--samples 10 --domain 105 --topic LargeDataTopic_3"
147+
148+
# PUBLISHERS
149+
publisher_reliable:
150+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
151+
container_name: publisher_reliable
152+
depends_on:
153+
- ddsrouter_edge_1
154+
networks:
155+
- edge_1_net
156+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 10 --msg-size 1 --domain 103 --topic LargeDataTopic_reliable --reliable --wait 1
157+
158+
publisher_1:
159+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
160+
container_name: publisher_1
161+
depends_on:
162+
- ddsrouter_edge_1
163+
networks:
164+
- edge_1_net
165+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 100000 --domain 103 --topic LargeDataTopic_1
166+
167+
publisher_2:
168+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
169+
container_name: publisher_2
170+
depends_on:
171+
- ddsrouter_edge_1
172+
networks:
173+
- edge_1_net
174+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 200000 --domain 103 --topic LargeDataTopic_1
175+
176+
publisher_3:
177+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
178+
container_name: publisher_3
179+
depends_on:
180+
- ddsrouter_edge_1
181+
networks:
182+
- edge_1_net
183+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 300000 --domain 103 --topic LargeDataTopic_1
184+
185+
publisher_4:
186+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
187+
container_name: publisher_4
188+
depends_on:
189+
- ddsrouter_edge_1
190+
networks:
191+
- edge_1_net
192+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 400000 --domain 103 --topic LargeDataTopic_1
193+
194+
publisher_5:
195+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
196+
container_name: publisher_5
197+
depends_on:
198+
- ddsrouter_edge_1
199+
networks:
200+
- edge_1_net
201+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 100000 --domain 103 --topic LargeDataTopic_2
202+
203+
publisher_6:
204+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
205+
container_name: publisher_6
206+
depends_on:
207+
- ddsrouter_edge_1
208+
networks:
209+
- edge_1_net
210+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 200000 --domain 103 --topic LargeDataTopic_2
211+
212+
publisher_7:
213+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
214+
container_name: publisher_7
215+
depends_on:
216+
- ddsrouter_edge_1
217+
networks:
218+
- edge_1_net
219+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 300000 --domain 103 --topic LargeDataTopic_2
220+
221+
publisher_8:
222+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
223+
container_name: publisher_8
224+
depends_on:
225+
- ddsrouter_edge_1
226+
networks:
227+
- edge_1_net
228+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 400000 --domain 103 --topic LargeDataTopic_2
229+
230+
publisher_9:
231+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
232+
container_name: publisher_9
233+
depends_on:
234+
- ddsrouter_edge_1
235+
networks:
236+
- edge_1_net
237+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 100000 --domain 103 --topic LargeDataTopic_3
238+
239+
publisher_10:
240+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
241+
container_name: publisher_10
242+
depends_on:
243+
- ddsrouter_edge_1
244+
networks:
245+
- edge_1_net
246+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 200000 --domain 103 --topic LargeDataTopic_3
247+
248+
publisher_11:
249+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
250+
container_name: publisher_11
251+
depends_on:
252+
- ddsrouter_edge_1
253+
networks:
254+
- edge_1_net
255+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 300000 --domain 103 --topic LargeDataTopic_3
256+
257+
publisher_12:
258+
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
259+
container_name: publisher_12
260+
depends_on:
261+
- ddsrouter_edge_1
262+
networks:
263+
- edge_1_net
264+
command: install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample publisher --interval 100 --samples 100 --msg-size 400000 --domain 103 --topic LargeDataTopic_3
265+
266+
267+
networks:
268+
edge_1_net:
269+
edge_2_net:
270+
cloud_edge_net:
271+
default:
272+
driver: none
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: v4.0
2+
3+
participants:
4+
5+
6+
7+
- name: Cloud_Participant_1_1
8+
kind: wan
9+
listening-addresses:
10+
- domain: ddsrouter_cloud_1
11+
port: 11800
12+
transport: udp
13+
14+
- name: Cloud_Participant_1_2
15+
kind: wan
16+
listening-addresses:
17+
- domain: ddsrouter_cloud_1
18+
port: 21800
19+
transport: udp
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: v4.0
2+
3+
participants:
4+
5+
6+
7+
- name: Cloud_Participant_2_1
8+
kind: wan
9+
listening-addresses:
10+
- domain: ddsrouter_cloud_2
11+
port: 31800
12+
transport: udp
13+
14+
- name: Cloud_Participant_2_2
15+
kind: wan
16+
connection-addresses:
17+
- domain: ddsrouter_cloud_1
18+
port: 21800
19+
transport: udp
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#############################
2+
# CHANGE DDS DOMAIN EXAMPLE #
3+
#############################
4+
5+
# Yaml configuration file version
6+
version: v4.0
7+
8+
participants:
9+
10+
- name: d103
11+
kind: local
12+
domain: 103
13+
14+
- name: ClientWAN_1
15+
kind: wan
16+
connection-addresses:
17+
- domain: ddsrouter_cloud_1
18+
port: 11800
19+
transport: udp
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#############################
2+
# CHANGE DDS DOMAIN EXAMPLE #
3+
#############################
4+
5+
# Yaml configuration file version
6+
version: v4.0
7+
8+
participants:
9+
10+
- name: d105
11+
kind: local
12+
domain: 105
13+
14+
- name: ClientWAN_2
15+
kind: wan
16+
connection-addresses:
17+
- domain: ddsrouter_cloud_2
18+
port: 31800
19+
transport: udp

0 commit comments

Comments
 (0)