Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19942] Make remove unused entities compatible with the discovery trigger #460

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions ddsrouter_test/compose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ set(TESTS
forwarding_routes/topic_routes
forwarding_routes/repeater

remove_unused_entities/disconnect
remove_unused_entities/disconnect_wan
remove_unused_entities/persist_diff_domain
remove_unused_entities/persist_same_domain
remove_unused_entities/reconnect
remove_unused_entities/reconnect_wan
remove_unused_entities/reader/disconnect
remove_unused_entities/reader/disconnect_wan
remove_unused_entities/reader/persist_diff_domain
remove_unused_entities/reader/persist_same_domain
remove_unused_entities/reader/reconnect
remove_unused_entities/reader/reconnect_wan
remove_unused_entities/writer/disconnect
remove_unused_entities/writer/disconnect_wan
remove_unused_entities/writer/persist_diff_domain
remove_unused_entities/writer/persist_same_domain
remove_unused_entities/writer/reconnect
remove_unused_entities/writer/reconnect_wan

frequency/max-tx-rate/specs
frequency/max-tx-rate/participant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_publisher.py --exe build/fastdds_configuration_example/configuration --n-unmatches 1 --timeout 8 --args "--samples 80 --domain 80 --name topic0 --interval 100"


Expand All @@ -59,7 +59,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 20 --timeout 4 --args "--samples 20 --domain 81 --name topic0"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ services:
networks:
- edge_0_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_publisher.py --exe build/fastdds_configuration_example/configuration --n-unmatches 1 --timeout 8 --args "--samples 80 --domain 80 --interval 100"

# DOMAIN 81
Expand All @@ -103,7 +103,7 @@ services:
networks:
- edge_1_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 20 --timeout 8 --args "--samples 20 --domain 81"

networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_publisher.py --exe build/fastdds_configuration_example/configuration --n-unmatches 1 --timeout 11 --args "--samples 110 --domain 80 --name topic0 --interval 100"

# DOMAIN 81
Expand All @@ -93,7 +93,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 40 --timeout 6 --args "--samples 40 --domain 81 --name topic0"


Expand All @@ -104,7 +104,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 40 --timeout 8 --delay 2 --args "--samples 40 --domain 82 --name topic0"

networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_publisher.py --exe build/fastdds_configuration_example/configuration --n-unmatches 1 --timeout 11 --args "--samples 110 --domain 80 --name topic0 --interval 100"


Expand All @@ -89,7 +89,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 40 --timeout 6 --args "--samples 40 --domain 81 --name topic0"

subscriber_t0_2:
Expand All @@ -98,7 +98,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 40 --timeout 8 --delay 2 --args "--samples 40 --domain 81 --name topic0"

networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: build/fastdds_configuration_example/configuration publisher --samples 110 --domain 80 --name topic0 --interval 100


Expand All @@ -70,7 +70,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 20 --timeout 3 --args "--samples 20 --domain 81 --name topic0"

subscriber_t0_2:
Expand All @@ -79,7 +79,7 @@ services:
networks:
- std_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 20 --timeout 6 --delay 4 --args "--samples 20 --domain 81 --name topic0"

networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ services:
networks:
- edge_1_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 20 --timeout 8 --args "--samples 20 --domain 81"

subscriber_2:
Expand All @@ -108,7 +108,7 @@ services:
networks:
- edge_1_net
volumes:
- ../../../scripts:/scripts
- ../../../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe build/fastdds_configuration_example/configuration --samples 20 --timeout 6 --delay 4 --args "--samples 20 --domain 81"

networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ participants:

specs:
remove-unused-entities: true
discovery-trigger: reader
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 build/fastdds_configuration_example/configuration --timeout 4 --args "--samples 40 --domain 80 --name 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 build/fastdds_configuration_example/configuration --samples 10 --timeout 8 --args "--domain 81 --samples 10 --name 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 build/fastdds_configuration_example/configuration --n-unmatches 1 --timeout 8 --args "--domain 81 --name topic0"

networks:
std_net:
default:
driver: none
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: v5.0

participants:

- name: Local_80
kind: local
domain: 80

- name: Local_81
kind: local
domain: 81

specs:
remove-unused-entities: true
discovery-trigger: writer
Loading
Loading