Skip to content

Commit

Permalink
Use buildNewFakeTransportAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Jan 22, 2019
1 parent 822176f commit 1616eaa
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
Expand All @@ -55,7 +54,6 @@
import org.elasticsearch.test.AbstractDiffableSerializationTestCase;

import java.io.IOException;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -325,7 +323,7 @@ public void testDisassociateDeadNodes_givenNoPersistentTasks() {

public void testDisassociateDeadNodes_givenAssignedPersistentTask() {
DiscoveryNodes nodes = DiscoveryNodes.builder()
.add(new DiscoveryNode("node1", new TransportAddress(InetAddress.getLoopbackAddress(), 9300), Version.CURRENT))
.add(new DiscoveryNode("node1", buildNewFakeTransportAddress(), Version.CURRENT))
.localNodeId("node1")
.masterNodeId("node1")
.build();
Expand All @@ -349,7 +347,7 @@ public void testDisassociateDeadNodes_givenAssignedPersistentTask() {

public void testDisassociateDeadNodes() {
DiscoveryNodes nodes = DiscoveryNodes.builder()
.add(new DiscoveryNode("node1", new TransportAddress(InetAddress.getLoopbackAddress(), 9300), Version.CURRENT))
.add(new DiscoveryNode("node1", buildNewFakeTransportAddress(), Version.CURRENT))
.localNodeId("node1")
.masterNodeId("node1")
.build();
Expand Down

0 comments on commit 1616eaa

Please sign in to comment.