Document es.node.mode and add possible options to error message

This commit is contained in:
Britta Weber 2014-04-02 14:27:31 +02:00
parent e189b3e37b
commit 0b449d3040
2 changed files with 10 additions and 5 deletions

View File

@ -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
-------------------------------------

View File

@ -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;