Skip to content

Commit

Permalink
Add discovery server tcp tests + remove tcp tests from failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
  • Loading branch information
jepemi committed Mar 15, 2024
1 parent 29de75f commit 428bcc0
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 7 deletions.
4 changes: 3 additions & 1 deletion ddsrouter_test/compose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ set(TESTS
repeater_tcp
tcp
udp
discovery_server
dds_rtps
dds

discovery_server/udp
discovery_server/tcp

rpc/ros2_services_cloud
rpc/ros2_services_repeater
rpc/ros2_services_repeater_with_talker
Expand Down
4 changes: 1 addition & 3 deletions ddsrouter_test/compose/TEST_XFAIL.list
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
tool.application.ddsrouter.compose.discovery_server
tool.application.ddsrouter.compose.repeater_tcp
tool.application.ddsrouter.compose.tcp
tool.application.ddsrouter.compose.discovery_server.tcp
tool.application.ddsrouter.compose.rpc_ros2_services_cloud
tool.application.ddsrouter.compose.rpc_ros2_services_correct_target
tool.application.ddsrouter.compose.rpc_ros2_services_repeater
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Test description:
# This test checks the Discovery Server functionality, by creating a Router Discovery Server blocking every topic.
# This test checks the TCP Discovery Server functionality, by creating a Router Discovery Server blocking every topic.
# The edge routers must discover each other via Discovery Server and transmit data from one another.
#
# Test architecture:
Expand Down Expand Up @@ -70,7 +70,7 @@ services:
networks:
- edge_1_net
volumes:
- ../../scripts:/scripts
- ../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 20 --timeout 12 --args "--domain 1 --samples 20"

ddsrouter_edge_2:
Expand All @@ -93,7 +93,7 @@ services:
networks:
- edge_2_net
volumes:
- ../../scripts:/scripts
- ../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 20 --timeout 12 --args "--domain 2 --samples 20"

networks:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v4.0

participants:

- name: Cloud_Discovery_Server_Participant
kind: wan-ds
discovery-server-guid:
id: 0
listening-addresses:
- ip: 127.0.0.1
port: 11666
transport: tcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: v4.0

participants:

- name: Simple_Participant
kind: local
domain: 1

- name: Edge_1_DS_Participant
kind: wan-ds
discovery-server-guid:
id: 1
connection-addresses:
- discovery-server-guid:
id: 0
addresses:
- ip: 127.0.0.1
port: 11666
transport: tcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: v4.0

participants:

- name: Simple_Participant
kind: local
domain: 2

- name: Edge_2_DS_Participant
kind: wan-ds
discovery-server-guid:
id: 2
connection-addresses:
- discovery-server-guid:
id: 0
addresses:
- ip: 127.0.0.1
port: 11666
transport: tcp
104 changes: 104 additions & 0 deletions ddsrouter_test/compose/test_cases/discovery_server/udp/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Test description:
# This test checks the UDP Discovery Server functionality, by creating a Router Discovery Server blocking every topic.
# The edge routers must discover each other via Discovery Server and transmit data from one another.
#
# Test architecture:
#
# ┌────────────────────────────────────────────────────────────────┐
# │ cloud_edge_net │
# │ │
# │ ┌──────────────────┐ │
# │ │ ddsrouter_cloud │ │
# │ │ (ds_wan | block) │ │
# │ └─▲──────────────▲─┘ │
# │ │ │ │
# │ ┌--------------┘ └---------┐ │
# ┌──────┼───────────┼──────────────────┐ ┌───────────┼────────────┼──────┐
# │ │ │ │ │ │ │ │
# │ │ ┌─────────▼────────┐ │ │ ┌───────▼──────────┐ │ │
# │ │ │ ddsrouter_edge_1 │──────────────────────│ ddsrouter_edge_2 │ │ │
# │ │ │ (local + ds_wan) │ │ │ │ (local + ds_wan) │ │ │
# │ │ └───────┬────▲─────┘ │ │ └───────┬──────────┘ │ │
# │ │ │ │ │ │ │ │ │
# │ └─────────┼────┼───────────────┼────────┼───────────┼────────────┘ │
# │ │ │ │ │ │ │
# │ ┌─────────────▼┐ ┌┴───────────┐ │ │ ┌──────▼───────┐ │
# │ │ sub_edge_1 │ │ pub_edge_1 │ │ │ │ sub_edge_2 │ │
# │ │ (subscriber) │ │ (publisher)│ │ │ │ (subscriber) │ │
# │ └──────────────┘ └────────────┘ │ │ └──────────────┘ │
# │ │ │ │
# │ edge_1_net (domain 1) │ │ edge_2_net (domain 2) │
# └─────────────────────────────────────┘ └───────────────────────────────┘

services:

ddsrouter_cloud:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: ddsrouter_cloud
networks:
- cloud_edge_net
volumes:
- ./ddsrouter_cloud_discovery.yaml:/config.yaml
command: ddsrouter -c /config.yaml --timeout 12

ddsrouter_edge_1:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: ddsrouter_edge_1
depends_on:
- ddsrouter_cloud
networks:
- cloud_edge_net
- edge_1_net
volumes:
- ./ddsrouter_edge_1.yaml:/config.yaml
command: ddsrouter -c /config.yaml --timeout 12

pub_edge_1:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: pub_edge_1
depends_on:
- ddsrouter_edge_1
networks:
- edge_1_net
command: install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample publisher -i 100 -s 110 -d 1

sub_edge_1:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: sub_edge_1
depends_on:
- ddsrouter_edge_1
networks:
- edge_1_net
volumes:
- ../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 20 --timeout 12 --args "--domain 1 --samples 20"

ddsrouter_edge_2:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: ddsrouter_edge_2
depends_on:
- ddsrouter_cloud
networks:
- cloud_edge_net
- edge_2_net
volumes:
- ./ddsrouter_edge_2.yaml:/config.yaml
command: ddsrouter -c /config.yaml --timeout 12

sub_edge_2:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: sub_edge_2
depends_on:
- ddsrouter_edge_2
networks:
- edge_2_net
volumes:
- ../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 20 --timeout 12 --args "--domain 2 --samples 20"

networks:
edge_1_net:
edge_2_net:
cloud_edge_net:
default:
driver: none

0 comments on commit 428bcc0

Please sign in to comment.