Rename method to get seed node address for network stress test

This one better conveys the intention of providing a new address each time it is called.
This commit is contained in:
Ivan Vilata-i-Balaguer 2016-05-10 15:23:22 +02:00
parent 5a4886ffa4
commit 39c9512673

View file

@ -125,7 +125,7 @@ public class NetworkStressTest {
// Create and start the seed node. // Create and start the seed node.
seedNode = new SeedNode(testDataDir.toString()); seedNode = new SeedNode(testDataDir.toString());
final NodeAddress seedNodeAddress = getSeedNodeAddress(); final NodeAddress seedNodeAddress = newSeedNodeAddress();
final boolean useLocalhost = seedNodeAddress.hostName.equals("localhost"); final boolean useLocalhost = seedNodeAddress.hostName.equals("localhost");
final Set<NodeAddress> seedNodes = new HashSet<>(1); final Set<NodeAddress> seedNodes = new HashSet<>(1);
seedNodes.add(seedNodeAddress); // the only seed node in tests seedNodes.add(seedNodeAddress); // the only seed node in tests
@ -165,7 +165,7 @@ public class NetworkStressTest {
} }
@NotNull @NotNull
private static NodeAddress getSeedNodeAddress() { private static NodeAddress newSeedNodeAddress() {
// The address is only considered by ``SeedNodesRepository`` if // The address is only considered by ``SeedNodesRepository`` if
// it ends in the digit matching the network identifier. // it ends in the digit matching the network identifier.
int port; int port;