Fix network.construction_with_specified_port (uses test network port) (#3714)
The test case network.construction_with_specified_port uses the test network port as the test port but that means this test fails if there is a test network node running on that machine. Convert the test to use nano::get_available_port() to avoid that problem.
This commit is contained in:
parent
9b246696b0
commit
d17d2c4364
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ TEST (network, tcp_connection)
|
|||
TEST (network, construction_with_specified_port)
|
||||
{
|
||||
nano::system system{};
|
||||
auto const port = nano::test_node_port ();
|
||||
auto const port = nano::get_available_port ();
|
||||
auto const node = system.add_node (nano::node_config{ port, system.logging });
|
||||
EXPECT_EQ (port, node->network.port);
|
||||
EXPECT_EQ (port, node->network.endpoint ().port ());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue