Commit Graph

73 Commits

Author SHA1 Message Date
Britta Weber 2f9eaae863 Testing doc: describe -Dtests.heap.size and -Dtests.jvm.argline 2014-08-21 15:59:31 +02:00
Simon Willnauer 9ddfaf3aaf [TEST] Expose `tests.filter` for elasticsearch tests.
`-Dtests.filter` allows to pass filter expressions to the elasticsearch
tests. This allows to filter test annotaged with TestGroup annotations
like @Slow, @Nightly, @Backwards, @Integration with a boolean expresssion like:

 * to run only backwards tests run:
     `mvn -Dtests.bwc.version=X.Y.Z -Dtests.filter="@backwards"`
 * to run all integration tests but skip slow tests run:
     `mvn -Dtests.filter="@integration and not @slow"
 * to take defaults into account ie run all test as well as backwards:
     `mvn -Dtests.filter="default and @backwards"

This feature is a more powerful alternative to flags like
`-Dtests.nighly=true|false` etc.

Closes #6703
2014-07-03 11:40:49 +02:00
Simon Willnauer fd1d02fd07 [TEST] Prevent usage of System Properties in the InternalTestCluster
All settings should be passes as settings and the enviroment should not
influence the test cluster settings. The settings we care about ie.
`es.node.mode` and `es.logger.level` should be passed via settings.
This allows tests to override these settings if they for instance need
`network` transport to operate at all.

Closes #6663
2014-07-01 18:05:44 +02:00
Simon Willnauer 309c7ceeff Added minimal setup guide for BW Compat tests 2014-06-27 15:39:53 +02:00
Simon Willnauer b2685f132a [TEST] Change es.node.mode default for tests to `local`
In order to speed up test execution we should run in local mode by
default. CI builds will still use network builds all the time.

Closes #6624
2014-06-27 11:57:34 +02:00
Simon Willnauer 4dfa822e1b [TEST] Add basic Backwards Compatibility Tests
This commit add a basic infrastructure as well as primitive tests
to ensure version backwards compatibility between the current
development trunk and an arbitrary previous version. The compatibility
tests are simple unit tests derived from a base class that starts
and manages nodes from a provided elasticsearch release package.

Use the following commandline executes all backwards compatiblity tests
in isolation:

```
mvn test -Dtests.bwc=true -Dtests.bwc.version=1.2.1 -Dtests.class=org.elasticsearch.bwcompat.*
```

These tests run basic checks like rolling upgrades and
routing/searching/get etc. against the specified version. The version
must be present in the `./backwards` folder as
`./backwards/elasticsearch-x.y.z`
2014-06-16 12:40:43 +02:00
javanna 9a68e60142 [TEST] Allow to disable randomization of shards and replicas via system property
Needed for REST backwards compatibility tests, since we need to run older tests with the latest runner, which randomizes shards and replicas, but the tests rely on defaults (5,1).

Done in a generic way based on compatibility versions e.g. `-Dtests.compatibility=1.0.0` allows to run tests in a special manner that is compatibile with 1.0.0 version.

Also moved back randomIndexTemplate to ElasticsearchIntegrationTest (from ImmutableCluster) where all the randomized aspects should be.

Closes #5897
2014-04-24 22:18:31 +02:00
javanna 918da65d35 [TEST] Added blacklist to be able to skip specific REST tests
The blacklist can be provided through -Dtests.rest.blacklist and supports a comma separated list of globs
e.g. -Dtests.rest.blacklist=get/10_basic/*,index/*/*

Also added some missing docs and made it clearer that the suite/test descriptions effectively contains their (relative) path (api/yaml_file/test section)

Closes #5881
2014-04-22 09:52:48 +02:00
javanna 1ec4f8f04b [TEST] Replaced RestTestSuiteRunner with parametrized test that uses RandomizedRunner directly
ElasticsearchRestTests extends now ElasticsearchIntegrationTest and makes use of our ordinary test infrastructure, in particular all randomized aspects now come for free instead of having to maintain a separate (custom) tests runner

We previously parsed only the tests that needed to be run given the version of the cluster the tests are running against. This doesn't happen anymore as it didn't buy much and it would be harder to support as the tests get now parsed before the test cluster gets started. Thus all the tests are now parsed regardless of their skip sections, afterwards the ones that don't need to be run will be skipped through assume directives.

Fixed REST tests that rely on a specific number of shards as this change introduces also random number of shards and replicas (through randomIndexTemplate)

Closes #5654
2014-04-07 17:08:05 +02:00
Britta Weber 0b449d3040 Document es.node.mode and add possible options to error message 2014-04-02 18:32:03 +02:00
javanna 806c4e87fb [TEST] Removed last occurences of cluster_seed, no longer used
Relates to #5233
2014-04-01 17:57:57 +02:00
Dawid Weiss d25c14a9e9 Minor cleanups. 2014-02-26 09:52:53 +01:00
Dawid Weiss aa3897280c The seed format is suite:method, clarified it in the docs. 2014-02-20 16:01:23 +01:00
Luca Cavanna a76620e3ac [TEST] run REST tests against multiple nodes (round-robin)
Multiple nodes are now started when running REST tests against the `TestCluster` (default randomized settings are now used instead of the hardcoded `1`)

Added also randomized round-robin based on all available nodes, and ability to provide multiple addresses when running tests against an external cluster to have the same behaviour
2014-02-07 13:52:48 +01:00
Luca Cavanna 56d3e98fff [TEST] added ability to filter REST test sections to run
Added `tests.rest.section` parameter that allows to filter the test sections that get executed via regex (case insensitive)
2014-02-03 15:30:58 +01:00
Luca Cavanna 08a077ffae re-enabled FileUtilsTests and REST tests as rest-api-spec has been added back
fixed rest-api-spec paths in TESTING docs

Relates to #4540 & #4376
2013-12-27 20:43:16 +01:00
Luca Cavanna 63cbc84393 removed rest-spec submodule and prepared project for same files added directly to the codebase (no submodule) within rest-api-spec
(temporarily disabled FileUtilsTests & REST tests as there's temporarily no rest-spec dir)

Relates to #4540 #4376
2013-12-27 20:36:12 +01:00
Shay Banon 488451b67c remove unused test env var from TESTING doc 2013-12-21 23:02:30 +01:00
Boaz Leskes 0fb984ebbd Removed a leftover line in TESTING.asciidoc 2013-12-18 12:04:03 +01:00
Boaz Leskes b1626535a9 Extended TESTING.asciidoc with an example of running just the REST tests from maven 2013-12-18 11:00:52 +01:00
Luca Cavanna d97a00d4a7 added REST test suites runner
The REST layer can now be tested through tests that are shared between all the elasticsearch official clients.
The tests are based on REST specification that can be found on the elasticsearch-rest-api-spec project and consist of YAML files that describe the operations to be executed and the obtained results that need to be tested.

REST tests can be executed through the ElasticsearchRestTests class, which relies on the rest-spec git submodule that contains the rest spec and tests pulled from the elasticsearch-rest-spec-api project. The rest-spec submodule gets automatically initialized and updated through maven (generate-test-resources phase).

The REST runner and the needed classes are distributed within the test artifact.

The following are the options supported by the REST tests runner:

- tests.rest[true|false|host:port]: determines whether the REST tests need to be run and if so whether to rely on an external cluster (providing host and port) or fire a test cluster (default)
- tests.rest.suite: comma separated paths of the test suites to be run (by default loaded from /rest-spec/test classpath). it is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-spec/test prefix is optional when files are loaded from classpath) e.g. -Dtests.rest.suite=index,get,create/10_with_id
- tests.rest.spec: REST spec path (default /rest-spec/api from classpath)
- tests.iters: runs multiple iterations
- tests.seed: seed to base the random behaviours on
- tests.appendseed[true|false]: enables adding the seed to each test section's description (default false)
- tests.cluster_seed: seed used to create the test cluster (if enabled)

Closes #4469
2013-12-17 15:36:16 +01:00
Luca Cavanna ed5b3ace57 Fixed local option explanation in TESTING readme 2013-12-07 20:52:47 +01:00
Lee Hinman 92a7b2465c Add TESTING document describing test settings 2013-09-13 11:51:15 -06:00