Skip to content

Commit 8d29df0

Browse files
committed
Use dynamic ports for ESSingleNodeTestCase too
Extends #45601 to cover all tests.
1 parent 56cb10e commit 8d29df0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import org.elasticsearch.plugins.Plugin;
5252
import org.elasticsearch.script.ScriptService;
5353
import org.elasticsearch.search.internal.SearchContext;
54+
import org.elasticsearch.transport.TransportSettings;
5455
import org.junit.AfterClass;
5556
import org.junit.BeforeClass;
5657

@@ -198,6 +199,7 @@ private Node newNode() {
198199
.put(ScriptService.SCRIPT_MAX_COMPILATIONS_RATE.getKey(), "1000/1m")
199200
.put(EsExecutors.PROCESSORS_SETTING.getKey(), 1) // limit the number of threads created
200201
.put("transport.type", getTestTransportType())
202+
.put(TransportSettings.PORT.getKey(), ESTestCase.getPortRange())
201203
.put(Node.NODE_DATA_SETTING.getKey(), true)
202204
.put(NodeEnvironment.NODE_ID_SEED_SETTING.getKey(), random().nextLong())
203205
// default the watermarks low values to prevent tests from failing on nodes without enough disk space

0 commit comments

Comments
 (0)