Skip to content

Commit 9e65831

Browse files
author
jparisu
committed
Refs #12522: Add test for tool reconnection
Signed-off-by: jparisu <javierparis@eprosima.com>
1 parent ba1f0da commit 9e65831

4 files changed

Lines changed: 326 additions & 0 deletions

File tree

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ list(APPEND TEST_LIST
118118
test_41_reconnect_with_clients
119119
test_42_server_reconnect_with_clients
120120
test_43_complex_reconnect
121+
test_44_fast_discovery_server_tool_reconnect
121122
)
122123

123124
# The above TEST_LIST has tests that spawn multiple test cases, we need a new variable to enumerate them
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<DS xmlns="http://www.eprosima.com/XMLSchemas/discovery-server" user_shutdown="false">
3+
4+
<!-- This test checks the clients can use a default server generated by a fastrtps external tool -->
5+
6+
<clients>
7+
<client name="client1" profile_name="UDP_client1_server1" removal_time="13">
8+
<publisher topic="topic1"/>
9+
</client>
10+
<client name="client2" profile_name="UDP_client2_server1" removal_time="6">
11+
<subscriber topic="topic1"/>
12+
</client>
13+
<client name="client3" profile_name="UDP_client3_server1" creation_time="16">
14+
<publisher topic="topic1"/>
15+
</client>
16+
<client name="client4" profile_name="UDP_client4_server1" creation_time="7">
17+
<subscriber topic="topic1"/>
18+
</client>
19+
</clients>
20+
21+
<snapshots file="./test_44_fast_discovery_server_tool_reconnect.snapshot~">
22+
<snapshot time="3">C1 and C2 know each other and Server</snapshot>
23+
<snapshot time="5">C1 and C2 know only each other</snapshot>
24+
<snapshot time="8">C1 and C4 do not know each other</snapshot>
25+
<snapshot time="12">C1 and C4 know each other and Server</snapshot>
26+
<snapshot time="15">C4 only knows Server</snapshot>
27+
<snapshot time="18">C3 and C4 know each other and Server</snapshot>+
28+
</snapshots>
29+
30+
<profiles>
31+
<participant profile_name="UDP_client1_server1" >
32+
<rtps>
33+
<prefix>63.6c.69.65.6e.74.31.5f.73.31.5f.5f</prefix>
34+
<builtin>
35+
<discovery_config>
36+
<discoveryProtocol>CLIENT</discoveryProtocol>
37+
<discoveryServersList>
38+
<RemoteServer prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41">
39+
<metatrafficUnicastLocatorList>
40+
<locator>
41+
<udpv4>
42+
<address>127.0.0.1</address>
43+
<port>44811</port>
44+
</udpv4>
45+
</locator>
46+
</metatrafficUnicastLocatorList>
47+
</RemoteServer>
48+
</discoveryServersList>
49+
</discovery_config>
50+
</builtin>
51+
</rtps>
52+
</participant>
53+
54+
<participant profile_name="UDP_client2_server1" >
55+
<rtps>
56+
<prefix>63.6c.69.65.6e.74.32.5f.73.31.5f.5f</prefix>
57+
<builtin>
58+
<discovery_config>
59+
<discoveryProtocol>CLIENT</discoveryProtocol>
60+
<discoveryServersList>
61+
<RemoteServer prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41">
62+
<metatrafficUnicastLocatorList>
63+
<locator>
64+
<udpv4>
65+
<address>127.0.0.1</address>
66+
<port>44811</port>
67+
</udpv4>
68+
</locator>
69+
</metatrafficUnicastLocatorList>
70+
</RemoteServer>
71+
</discoveryServersList>
72+
</discovery_config>
73+
</builtin>
74+
</rtps>
75+
</participant>
76+
77+
<participant profile_name="UDP_client3_server1" >
78+
<rtps>
79+
<prefix>63.6c.69.65.6e.74.33.5f.73.31.5f.5f</prefix>
80+
<builtin>
81+
<discovery_config>
82+
<discoveryProtocol>CLIENT</discoveryProtocol>
83+
<discoveryServersList>
84+
<RemoteServer prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41">
85+
<metatrafficUnicastLocatorList>
86+
<locator>
87+
<udpv4>
88+
<address>127.0.0.1</address>
89+
<port>44811</port>
90+
</udpv4>
91+
</locator>
92+
</metatrafficUnicastLocatorList>
93+
</RemoteServer>
94+
</discoveryServersList>
95+
</discovery_config>
96+
</builtin>
97+
</rtps>
98+
</participant>
99+
100+
<participant profile_name="UDP_client4_server1" >
101+
<rtps>
102+
<prefix>63.6c.69.65.6e.74.34.5f.73.31.5f.5f</prefix>
103+
<builtin>
104+
<discovery_config>
105+
<discoveryProtocol>CLIENT</discoveryProtocol>
106+
<discoveryServersList>
107+
<RemoteServer prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41">
108+
<metatrafficUnicastLocatorList>
109+
<locator>
110+
<udpv4>
111+
<address>127.0.0.1</address>
112+
<port>44811</port>
113+
</udpv4>
114+
</locator>
115+
</metatrafficUnicastLocatorList>
116+
</RemoteServer>
117+
</discoveryServersList>
118+
</discovery_config>
119+
</builtin>
120+
</rtps>
121+
</participant>
122+
123+
<topic profile_name="topic1">
124+
<name>topic_1</name>
125+
<dataType>sample_type_1</dataType>
126+
</topic>
127+
128+
<types>
129+
<type>
130+
<struct name="sample_type_1">
131+
<member name="index" type="uint32" />
132+
<member name="message" type="string" />
133+
</struct>
134+
</type>
135+
</types>
136+
137+
</profiles>
138+
139+
</DS>
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<DS_Snapshots xmlns="http://www.eprosima.com/XMLSchemas/ds-snapshot">
3+
<DS_Snapshot timestamp="1635235945060" process_time="3000" last_pdp_callback_time="469" last_edp_callback_time="920" someone="true">
4+
<description>C1 and C2 know each other and Server</description>
5+
<ptdb guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
6+
<ptdi guid_prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41" guid_entity="0.0.1.c1" server="false" alive="true" name="eProsima Default Server number 0" discovered_timestamp="111"/>
7+
<ptdi guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="14">
8+
<publisher type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.3" discovered_timestamp="14"/>
9+
</ptdi>
10+
<ptdi guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="client2" discovered_timestamp="469">
11+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="920"/>
12+
</ptdi>
13+
</ptdb>
14+
<ptdb guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
15+
<ptdi guid_prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41" guid_entity="0.0.1.c1" server="false" alive="true" name="eProsima Default Server number 0" discovered_timestamp="111"/>
16+
<ptdi guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="client1" discovered_timestamp="469">
17+
<publisher type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.3" discovered_timestamp="920"/>
18+
</ptdi>
19+
<ptdi guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="18">
20+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="18"/>
21+
</ptdi>
22+
</ptdb>
23+
</DS_Snapshot>
24+
<DS_Snapshot timestamp="1635235947060" process_time="5000" last_pdp_callback_time="4003" last_edp_callback_time="920" someone="true">
25+
<description>C1 and C2 know only each other</description>
26+
<ptdb guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
27+
<ptdi guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="14">
28+
<publisher type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.3" discovered_timestamp="14"/>
29+
</ptdi>
30+
<ptdi guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="client2" discovered_timestamp="469">
31+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="920"/>
32+
</ptdi>
33+
</ptdb>
34+
<ptdb guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
35+
<ptdi guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="client1" discovered_timestamp="469">
36+
<publisher type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.3" discovered_timestamp="920"/>
37+
</ptdi>
38+
<ptdi guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="18">
39+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="18"/>
40+
</ptdi>
41+
</ptdb>
42+
</DS_Snapshot>
43+
<DS_Snapshot timestamp="1635235950060" process_time="8000" last_pdp_callback_time="4003" last_edp_callback_time="7008" someone="true">
44+
<description>C1 and C4 do not know each other</description>
45+
<ptdb guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
46+
<ptdi guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="14">
47+
<publisher type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.3" discovered_timestamp="14"/>
48+
</ptdi>
49+
<ptdi guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="client2" discovered_timestamp="469">
50+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="920"/>
51+
</ptdi>
52+
</ptdb>
53+
<ptdb guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
54+
<ptdi guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="7008">
55+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="7008"/>
56+
</ptdi>
57+
</ptdb>
58+
</DS_Snapshot>
59+
<DS_Snapshot timestamp="1635235954060" process_time="12000" last_pdp_callback_time="9594" last_edp_callback_time="7008" someone="true">
60+
<description>C1 and C4 know each other and Server</description>
61+
<ptdb guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
62+
<ptdi guid_prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41" guid_entity="0.0.1.c1" server="false" alive="true" name="eProsima Default Server number 0" discovered_timestamp="9594"/>
63+
<ptdi guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="14">
64+
<publisher type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.3" discovered_timestamp="14"/>
65+
</ptdi>
66+
<ptdi guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="client2" discovered_timestamp="469">
67+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.32.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="920"/>
68+
</ptdi>
69+
<ptdi guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="7008">
70+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="7008"/>
71+
</ptdi>
72+
</ptdb>
73+
<ptdb guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
74+
<ptdi guid_prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41" guid_entity="0.0.1.c1" server="false" alive="true" name="eProsima Default Server number 0" discovered_timestamp="9594"/>
75+
<ptdi guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="7008">
76+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="7008"/>
77+
</ptdi>
78+
<ptdi guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="14">
79+
<publisher type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.31.5f.73.31.5f.5f" guid_entity="0.0.1.3" discovered_timestamp="14"/>
80+
</ptdi>
81+
</ptdb>
82+
</DS_Snapshot>
83+
<DS_Snapshot timestamp="1635235957060" process_time="15000" last_pdp_callback_time="9594" last_edp_callback_time="7008" someone="true">
84+
<description>C4 only knows Server</description>
85+
<ptdb guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
86+
<ptdi guid_prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41" guid_entity="0.0.1.c1" server="false" alive="true" name="eProsima Default Server number 0" discovered_timestamp="9594"/>
87+
<ptdi guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="7008">
88+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="7008"/>
89+
</ptdi>
90+
</ptdb>
91+
</DS_Snapshot>
92+
<DS_Snapshot timestamp="1635235960060" process_time="18000" last_pdp_callback_time="16463" last_edp_callback_time="16914" someone="true">
93+
<description>C3 and C4 know each other and Server</description>
94+
<ptdb guid_prefix="63.6c.69.65.6e.74.33.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
95+
<ptdi guid_prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41" guid_entity="0.0.1.c1" server="false" alive="true" name="eProsima Default Server number 0" discovered_timestamp="16124"/>
96+
<ptdi guid_prefix="63.6c.69.65.6e.74.33.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="16010">
97+
<publisher type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.33.5f.73.31.5f.5f" guid_entity="0.0.1.3" discovered_timestamp="16010"/>
98+
</ptdi>
99+
<ptdi guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="client4" discovered_timestamp="16463">
100+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="16914"/>
101+
</ptdi>
102+
</ptdb>
103+
<ptdb guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1">
104+
<ptdi guid_prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41" guid_entity="0.0.1.c1" server="false" alive="true" name="eProsima Default Server number 0" discovered_timestamp="9594"/>
105+
<ptdi guid_prefix="63.6c.69.65.6e.74.33.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="client3" discovered_timestamp="16463">
106+
<publisher type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.33.5f.73.31.5f.5f" guid_entity="0.0.1.3" discovered_timestamp="16913"/>
107+
</ptdi>
108+
<ptdi guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.c1" server="false" alive="true" name="" discovered_timestamp="7008">
109+
<subscriber type="sample_type_1" topic="topic_1" guid_prefix="63.6c.69.65.6e.74.34.5f.73.31.5f.5f" guid_entity="0.0.1.4" discovered_timestamp="7008"/>
110+
</ptdi>
111+
</ptdb>
112+
</DS_Snapshot>
113+
</DS_Snapshots>

0 commit comments

Comments
 (0)