diff --git a/TESTING.asciidoc b/TESTING.asciidoc index 51acf911707..282c7e08036 100644 --- a/TESTING.asciidoc +++ b/TESTING.asciidoc @@ -2,7 +2,7 @@ = Testing [partintro] --- + Elasticsearch uses jUnit for testing, it also uses randomness in the tests, that can be set using a seed, the following is a cheatsheet of options for running the tests for ES. @@ -18,17 +18,22 @@ mvn clean package -DskipTests == Other test options -To disable and enable network transport, set the `ES_TEST_LOCAL` -environment variable. +To disable and enable network transport, set the `Des.node.mode`. Use network transport (default): ------------------------------------ -export ES_TEST_LOCAL=false && mvn test +-Des.node.mode=network ------------------------------------ Use local transport: +------------------------------------- +-Des.node.mode=local +------------------------------------- + +Alternatively, you can set the `ES_TEST_LOCAL` environment variable: + ------------------------------------- export ES_TEST_LOCAL=true && mvn test ------------------------------------- diff --git a/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java b/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java index 185eb0ada8b..4db132c84f7 100644 --- a/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java +++ b/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java @@ -54,7 +54,7 @@ public class DiscoveryNode implements Streamable, Serializable { } else if ("network".equals(nodeMode)) { return false; } else { - throw new ElasticsearchIllegalArgumentException("unsupported node.mode [" + nodeMode + "]"); + throw new ElasticsearchIllegalArgumentException("unsupported node.mode [" + nodeMode + "]. Should be one of [local, network]."); } } return false;