Skip to content

Commit

Permalink
Refs #20650: Add missing configurations that were lost in the review
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso committed Jun 13, 2024
1 parent 29b2f6c commit 782569b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions examples/cpp/delivery_mechanisms/PubSubApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ PubSubApp::PubSubApp(
tcp_transport_->set_WAN_address("127.0.0.1");
tcp_transport_->add_listener_port(5100);
pqos.transport().user_transports.push_back(tcp_transport_);
Locator tcp_initial_peers_locator_;
tcp_initial_peers_locator_.kind = LOCATOR_KIND_TCPv4;
tcp_initial_peers_locator_.port = 5100;
eprosima::fastrtps::rtps::IPLocator::setIPv4(tcp_initial_peers_locator_, "127.0.0.1");
pqos.wire_protocol().builtin.initialPeersList.push_back(tcp_initial_peers_locator_);
break;
}
case CLIParser::DeliveryMechanismKind::UDP:
Expand Down
12 changes: 6 additions & 6 deletions examples/cpp/delivery_mechanisms/SubscriberApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ SubscriberApp::SubscriberApp(
}
case CLIParser::DeliveryMechanismKind::TCP:
{
std::shared_ptr<TCPv4TransportDescriptor> tcp_transport_ = std::make_shared<TCPv4TransportDescriptor>();
Locator tcp_initial_peers_locator_;
tcp_initial_peers_locator_.kind = LOCATOR_KIND_TCPv4;
tcp_initial_peers_locator_.port = 5100;
eprosima::fastrtps::rtps::IPLocator::setIPv4(tcp_initial_peers_locator_, "127.0.0.1");
pqos.wire_protocol().builtin.initialPeersList.push_back(tcp_initial_peers_locator_);
pqos.wire_protocol().builtin.discovery_config.leaseDuration = eprosima::fastrtps::c_TimeInfinite;
pqos.wire_protocol().builtin.discovery_config.leaseDuration_announcementperiod = Duration_t(5, 0);
tcp_transport_->sendBufferSize = 0;
tcp_transport_->receiveBufferSize = 0;
tcp_transport_->set_WAN_address("127.0.0.1");
tcp_transport_->add_listener_port(5100);
pqos.transport().user_transports.push_back(tcp_transport_);
pqos.transport().user_transports.push_back(std::make_shared<TCPv4TransportDescriptor>());
break;
}
case CLIParser::DeliveryMechanismKind::UDP:
Expand Down
2 changes: 2 additions & 0 deletions test/examples/test_delivery_mechanisms.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def test_delivery_mechanisms(pub_args, sub_args, repetitions):
except subprocess.TimeoutExpired:
print('TIMEOUT')
print(out)

assert(ret)

delivery_timeout_test_cases = [
('--mechanism shm --ignore-local-endpoints', '--mechanism udp'),
Expand Down

0 comments on commit 782569b

Please sign in to comment.