-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: tempate <danieldiaz@eprosima.com>
- Loading branch information
1 parent
8600297
commit b209bc5
Showing
37 changed files
with
903 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ participants: | |
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: reader |
90 changes: 90 additions & 0 deletions
90
ddsrouter_test/compose/test_cases/remove_unused_entities/writer/disconnect/compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Test description: | ||
# This test checks that tracks get deleted when their last publisher disconnects. | ||
# | ||
# Test architecture: | ||
# | ||
# 1. Check that the subscribers connect to the publisher. | ||
# | ||
# ┌───────────────────┐ ┌────────────────────┐ | ||
# │ Domain 80 │ │ Domain 81 │ | ||
# │ ┌──────────────┐ ┌┼────────────┼┐ ┌───────────────┐ │ | ||
# │ │publisher_0_t0│ ││ ddsrouter ││ │subscriber_1_t0│ │ | ||
# │ │ ─┼─┼┤► ─┼┼─┤► │ │ | ||
# │ │(local) │ ││ (local) ││ │(local) │ │ | ||
# │ └──────────────┘ └┼──────────┬─┼┘ └───────────────┘ │ | ||
# │ │ │ │ │ | ||
# └───────────────────┘ │ │ ┌───────────────┐ │ | ||
# │ │ │subscriber_2_t0│ │ | ||
# └─┼──┤► │ │ | ||
# │ │(local) │ │ | ||
# │ └───────────────┘ │ | ||
# │ │ | ||
# └────────────────────┘ | ||
# | ||
# 2. Check that when the publisher disconnects the track gets deleted. | ||
# | ||
# ┌───────────────────┐ ┌────────────────────┐ | ||
# │ Domain 80 │ │ Domain 81 │ | ||
# │ ┌┼─────────────┼┐ ┌───────────────┐ │ | ||
# │ ││ ddsrouter ││ │subscriber_2_t0| │ | ||
# │ ││ ││ │ │ │ | ||
# │ ││ (local) ││ │(local) │ │ | ||
# │ └┼─────────────┼┘ └───────────────┘ │ | ||
# │ │ │ │ | ||
# └───────────────────┘ └────────────────────┘ | ||
# | ||
|
||
services: | ||
|
||
# ROUTER | ||
ddsrouter: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: ddsrouter | ||
networks: | ||
- std_net | ||
volumes: | ||
- ./ddsrouter.yaml:/config.yaml | ||
command: ddsrouter -c /config.yaml --timeout 10 | ||
|
||
# DOMAIN 80 | ||
publisher_0_t0: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: publisher_0_t0 | ||
depends_on: | ||
- ddsrouter | ||
networks: | ||
- std_net | ||
volumes: | ||
- ../../../../scripts:/scripts | ||
command: python3 /scripts/execute_and_validate_publisher.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --timeout 4 --args "--samples 40 --domain 80 --topic topic0 --interval 100" | ||
|
||
# DOMAIN 81 | ||
|
||
# Subscriber to verify the track has been created | ||
subscriber_1_t0: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: subscriber_1_t0 | ||
depends_on: | ||
- ddsrouter | ||
networks: | ||
- std_net | ||
volumes: | ||
- ../../../../scripts:/scripts | ||
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --samples 10 --timeout 8 --args "--domain 81 --samples 10 --topic topic0" | ||
|
||
# Subscriber to verify the track has been deleted | ||
subscriber_2_t0: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: subscriber_2_t0 | ||
depends_on: | ||
- ddsrouter | ||
networks: | ||
- std_net | ||
volumes: | ||
- ../../../../scripts:/scripts | ||
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --n-unmatches 1 --timeout 8 --args "--domain 81 --topic topic0" | ||
|
||
networks: | ||
std_net: | ||
default: | ||
driver: none |
15 changes: 15 additions & 0 deletions
15
ddsrouter_test/compose/test_cases/remove_unused_entities/writer/disconnect/ddsrouter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: v4.0 | ||
|
||
participants: | ||
|
||
- name: Local_80 | ||
kind: local | ||
domain: 80 | ||
|
||
- name: Local_81 | ||
kind: local | ||
domain: 81 | ||
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: writer |
127 changes: 127 additions & 0 deletions
127
ddsrouter_test/compose/test_cases/remove_unused_entities/writer/disconnect_wan/compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# Test description: | ||
# This test checks that the removal of unused entities frees up bandwidth | ||
# over a WAN connection when there aren't any publishers. To achieve it, the | ||
# test sets up four routers, a subscriber, and a publisher. It then checks | ||
# that the subscriber receives the data from the publisher, and then it stops | ||
# the connection and checks if the tracks have been destroyed. | ||
# | ||
# Test architecture: | ||
# | ||
# ┌─────────────────────────────────────────┐ | ||
# │ cloud_edge_net │ | ||
# │ ┌─────────────────┐ ┌─────────────────┐ │ | ||
# │ │ddsrouter_cloud_0│ │ddsrouter_cloud_1│ │ | ||
# │ │ ─┼─┤► │ │ | ||
# │ │(wan + wan) │ │(wan + wan) │ │ | ||
# │ └──────────────▲──┘ └──────────────┬──┘ │ | ||
# │ │ │ │ | ||
# │ ┌──────────────┼──┐ ┌──────────────┼──┐ │ | ||
# │ │ Domain 80 │ │ │ Domain 81 │ │ │ | ||
# │ │ │ │ │ │ │ │ | ||
# │ │ edge_0_net │ │ │ edge_1_net │ │ │ | ||
# │ │ ┌────────────┴┐ │ │ ┌────────────▼┐ │ │ | ||
# │ │ │ddsrouter_0 │ │ │ │ddsrouter_1 │ │ │ | ||
# │ │ │ │ │ │ │ │ │ │ | ||
# │ │ │(local + wan)│ │ │ │(local + wan)│ │ │ | ||
# │ │ └──────────▲──┘ │ │ └──────────┬──┘ │ │ | ||
# │ │ │ │ │ │ │ │ | ||
# └─┼────────────┼────┼─┼────────────┼────┼─┘ | ||
# │ │ │ │ │ │ | ||
# │ ┌──────────┴──┐ │ │ ┌──────────▼──┐ │ | ||
# │ │publisher_t0 │ │ │ │subscriber_t0│ │ | ||
# │ │ │ │ │ │ │ │ | ||
# │ │(local) │ │ │ │(local) │ │ | ||
# │ └─────────────┘ │ │ └─────────────┘ │ | ||
# │ │ │ │ | ||
# └─────────────────┘ └─────────────────┘ | ||
|
||
services: | ||
|
||
# CLOUD | ||
ddsrouter_cloud_0: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: ddsrouter_cloud_0 | ||
networks: | ||
- cloud_edge_net | ||
volumes: | ||
- ./ddsrouter_cloud_0.yaml:/config.yaml | ||
command: ddsrouter -c /config.yaml --timeout 8 | ||
|
||
ddsrouter_cloud_1: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: ddsrouter_cloud_1 | ||
depends_on: | ||
- ddsrouter_cloud_0 | ||
networks: | ||
- cloud_edge_net | ||
volumes: | ||
- ./ddsrouter_cloud_1.yaml:/config.yaml | ||
command: ddsrouter -c /config.yaml --timeout 8 | ||
|
||
# DOMAIN 80 | ||
ddsrouter_edge_0: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: ddsrouter_edge_0 | ||
depends_on: | ||
- ddsrouter_cloud_0 | ||
networks: | ||
- cloud_edge_net | ||
- edge_0_net | ||
volumes: | ||
- ./ddsrouter_edge_0.yaml:/config.yaml | ||
command: ddsrouter -c /config.yaml --timeout 8 | ||
|
||
publisher_0: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: publisher_0 | ||
depends_on: | ||
- ddsrouter_edge_0 | ||
networks: | ||
- edge_0_net | ||
volumes: | ||
- ../../../../scripts:/scripts | ||
command: python3 /scripts/execute_and_validate_publisher.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --timeout 4 --args "--samples 40 --domain 80 --topic topic0 --interval 100" | ||
|
||
# DOMAIN 81 | ||
ddsrouter_edge_1: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: ddsrouter_edge_1 | ||
depends_on: | ||
- ddsrouter_cloud_1 | ||
networks: | ||
- cloud_edge_net | ||
- edge_1_net | ||
volumes: | ||
- ./ddsrouter_edge_1.yaml:/config.yaml | ||
command: ddsrouter -c /config.yaml --timeout 8 | ||
|
||
# Subscriber to verify the track has been created | ||
subscriber_1: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: subscriber_1 | ||
depends_on: | ||
- ddsrouter_edge_1 | ||
networks: | ||
- edge_1_net | ||
volumes: | ||
- ../../../../scripts:/scripts | ||
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --samples 10 --timeout 8 --args "--domain 81 --samples 10 --topic topic0" | ||
|
||
# Subscriber to verify the track has been deleted | ||
subscriber_2: | ||
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} | ||
container_name: subscriber_2 | ||
depends_on: | ||
- ddsrouter_edge_1 | ||
networks: | ||
- edge_1_net | ||
volumes: | ||
- ../../../../scripts:/scripts | ||
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/AdvancedConfigurationExample/examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationExample --n-unmatches 1 --timeout 8 --args "--domain 81 --topic topic0" | ||
|
||
networks: | ||
edge_0_net: | ||
edge_1_net: | ||
cloud_edge_net: | ||
default: | ||
driver: none |
21 changes: 21 additions & 0 deletions
21
...st/compose/test_cases/remove_unused_entities/writer/disconnect_wan/ddsrouter_cloud_0.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: v4.0 | ||
|
||
participants: | ||
|
||
- name: Cloud_Participant_0 | ||
kind: wan | ||
listening-addresses: | ||
- domain: ddsrouter_cloud_0 | ||
port: 11666 | ||
transport: udp | ||
|
||
- name: Cloud_Participant_1 | ||
kind: wan | ||
listening-addresses: | ||
- domain: ddsrouter_cloud_0 | ||
port: 21666 | ||
transport: udp | ||
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: writer |
21 changes: 21 additions & 0 deletions
21
...st/compose/test_cases/remove_unused_entities/writer/disconnect_wan/ddsrouter_cloud_1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: v4.0 | ||
|
||
participants: | ||
|
||
- name: Cloud_Participant_0 | ||
kind: wan | ||
listening-addresses: | ||
- domain: ddsrouter_cloud_1 | ||
port: 31666 | ||
transport: udp | ||
|
||
- name: Cloud_Participant_1 | ||
kind: wan | ||
connection-addresses: | ||
- domain: ddsrouter_cloud_0 | ||
port: 21666 | ||
transport: udp | ||
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: writer |
18 changes: 18 additions & 0 deletions
18
...est/compose/test_cases/remove_unused_entities/writer/disconnect_wan/ddsrouter_edge_0.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: v4.0 | ||
|
||
participants: | ||
|
||
- name: Local_80 | ||
kind: local | ||
domain: 80 | ||
|
||
- name: Edge_Participant | ||
kind: wan | ||
connection-addresses: | ||
- domain: ddsrouter_cloud_0 | ||
port: 11666 | ||
transport: udp | ||
|
||
specs: | ||
remove-unused-entities: true | ||
discovery-trigger: writer |
Oops, something went wrong.