Skip to content

Commit

Permalink
Connect ecflow client to "localhost"
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosbento committed Oct 13, 2023
1 parent 74ea379 commit 9195adc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Udp/test/TestSupport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "Host.hpp"
#include "Node.hpp"
#include "NodeAttr.hpp"
#include "Str.hpp"
#include "UDPClient.hpp"

namespace bp = boost::process;
Expand Down Expand Up @@ -75,7 +76,7 @@ class MockServer : public BaseMockServer<MockServer> {
explicit MockServer(port_t port) : BaseMockServer<MockServer>(ecf::Host{}.name(), port) {}

void load_definition(const std::string& defs) const {
ClientInvoker client(host(), port());
ClientInvoker client(ecf::Str::LOCALHOST(), port());
auto error = client.loadDefs(defs);
BOOST_REQUIRE_MESSAGE(!error, "unable to load definitions");
std::cout << " MOCK: reference ecFlow suite has been loaded" << std::endl;
Expand All @@ -99,7 +100,7 @@ class MockServer : public BaseMockServer<MockServer> {
private:
node_ptr get_node_at(const std::string& path) const {
std::cout << " Creating ecflow_client connected to " << host() << ":" << port() << std::endl;
ClientInvoker client(host(), port());
ClientInvoker client(ecf::Str::LOCALHOST(), port());

// load all definitions
std::shared_ptr<Defs> defs = nullptr;
Expand Down Expand Up @@ -137,12 +138,11 @@ class MockServer : public BaseMockServer<MockServer> {
invoke_command += std::to_string(port);
invoke_command += " -d &";

std::cout << "Launching ecflow_server @" << host << ":" << port << ", with: " << invoke_command
<< std::endl;
std::cout << "Launching ecflow_server @" << host << ":" << port << ", with: " << invoke_command << std::endl;

bp::child child(invoke_command);

ClientInvoker client(host, port);
ClientInvoker client(ecf::Str::LOCALHOST(), port);
if (!client.wait_for_server_reply(5)) {
BOOST_REQUIRE_MESSAGE(false, "could not launch ecflow server");
}
Expand Down

0 comments on commit 9195adc

Please sign in to comment.