Commit Graph

372 Commits

Author SHA1 Message Date
Shay Banon 21a3667888 Upgrade to mvel 2.2.0.Final
closes #5877
2014-04-18 21:52:24 +02:00
Simon Willnauer eaf04fc828 [BUILD] Fail release if test have AwaitsFix annotations
Note this commit upgrades Forbidden APIs to version 1.5

Closes #5807
2014-04-17 16:45:46 +02:00
Shay Banon bc5bdbc5de Remove jsr166y now that we on Java 7, cleanup jsr166e to classes we use 2014-04-15 13:17:28 +02:00
Simon Willnauer 8bede7024f Use TransportBulkAction for internal request from IndicesTTLService
This prevents executing bulks internal autocreate indices logic
and ensures that this internal request never creates an index
automaticall.

This fixes a bug where the TTL purger thread ran after the actual
index it was purging was already closed / deleted and that re-created
that index.

Closes #5766
2014-04-15 12:40:25 +02:00
Simon Willnauer 754eb16835 Upgrade to Lucene 4.7.2 2014-04-14 18:30:03 +02:00
Bill Hwang dcc6a6e138 [BUILD] Remove site dependencies generation
Removed dependencies library generation.  It stalls Jenkins static analysis job
2014-04-07 16:01:02 -07: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
Simon Willnauer 6f5b7fa086 [BUILD] Set -Dtests.jvms=auto by default to make use of multiple JVMs 2014-04-03 13:01:01 +02:00
Simon Willnauer 42b20d601f Upgrade to Lucene 4.7.1
* Removed XTermsFilter fixed in LUCENE-5502
 * Switched back to automaton queries that caused failures due to LUCENE-5532
 * Fixed Highlight test that has different results due to LUCENE-5538
2014-04-01 23:50:55 +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
Simon Willnauer 71de2bc414 [BUILD] Allow to set tests memory via the commandline 2014-04-01 14:12:52 +02:00
javanna 38dd501ab5 [TEST] added ExternalTestCluster that allows to run tests against an external cluster
All the ordinary test operations happen based on the ImmutableTestCluster base class and are executed via transport client. Will be used especially for the REST tests once migrated to the standard randomized runner.

Added new httpAddresses method to ImmutableTestCluster to be able to retrieve the http addresses to connect to for the REST tests. Both versions will look inside the cluster to figure out which nodes are available for http calls and their addresses.

The external cluster is used as global cluster if the tests.cluster system property is available. The property needs to contain a comma separated list of available elasticsearch nodes that will be used to connect to the cluster (e.g. localhost:9300,localhost:9301).

Only a subset of the integration tests can currently be run successfully against the external cluster, for more precision the ones that don't modify the cluster layout (don't require cluster() functionalities but rely only on immutableCluster()). Also at least two data nodes are required otherwise the ensureGreen calls cannot succeed.

Closes #5630
2014-04-01 11:45:35 +02:00
Kevin e78bbbf3ec add CBOR data format support 2014-03-28 20:30:39 +11:00
Simon Willnauer f1b32c4636 [Build] use the same execution hint file across the pom file 2014-03-27 16:28:22 +01:00
Simon Willnauer 11b51b1780 [Build] use branch version in execution hit file name 2014-03-27 15:32:53 +01:00
Adrien Grand b5b82626e7 Forbid Math.abs(int/long).
We have had a couple of bugs because of the use of these methods without paying
attention that it might return a negative value when provided with MIN_VALUE.
There is one common and legitimate usage of this method in order to perform
a modulo operation which would always return a positive number. This use-case
has been extracted to MathUtils.mod.

Close #5562
2014-03-27 14:50:43 +01:00
Robert Muir 5babf59813 Update to forbidden-apis 1.4.1
Closes #5492
2014-03-22 15:00:19 -04:00
Simon Willnauer 876b2592ac [Build] Skip topN hints if tests are skipped 2014-03-20 12:45:35 +01:00
Simon Willnauer 7c494461f3 [BUILD] Add top execution hints to test phase
Added a ant task that prints the Top N most expensive tests after
each test run.
2014-03-20 12:29:48 +01:00
David Smiley 644fdfc4aa Upgrade to Spatial4j 0.4.1 and JTS 1.13
Fixes #5279
2014-03-20 11:17:51 +01:00
Bill Hwang fe487373e6 Revert "Findbug warning supression"
This reverts commit 744eabad03.
2014-03-17 13:55:39 -07:00
Bill Hwang 744eabad03 Findbug warning supression
Added logic to enable findbug warnings supression via annotations
2014-03-17 13:35:37 -07:00
Dridi Boukelmoune 9500dddad3 Move systemd files from /etc to /usr/lib
As documented in systemd's manual pages tmpfiles.d(5) and systemd.unit(5),
a package should install its default configuration in /usr/lib, which can
be overriden by system administrators in /etc.

New locations in the rpm:
/usr/lib/systemd/system/elasticsearch.service
/usr/lib/tmpfiles.d/elasticsearch.conf
2014-03-17 14:06:34 +01:00
David Pilato c6915ef4d6 Enforce java version 1.7
When building elasticsearch, we now require to use java 1.7.

Maven will check that before compiling any class. If Java version is incorrect, you will get the following message:

```
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.6.0-65 is not in the allowed range [1.7,).
```

Closes #5428.
2014-03-17 08:43:33 +01:00
Simon Willnauer 821173b5cf Enforce query instance checking before it wrapper as a filter
We have the default QueryWrapperFilter as well as our custom one while
our wrapper is explicitly marked as no_cache such that it will never
be included in a cache. This was not consistenly used and caused several
problems during tests where p/c related queries were used as filters
and ended up in the cache. This commit adds the QueryWrapperFilter
ctor to the forbidden APIs to enforce the query instance checks.
2014-03-14 20:18:01 +01:00
javanna d80dd00424 upgrade randomized-testing to 2.1.1
Note that the standard `atLeast` implementation has now Integer.MAX_VALUE as upper bound, thus it behaves differently from what we expect in our tests, as we never expect the upper bound to be that high.
Added our own `atLeast` to `AbstractRandomizedTest` so that it has the expected behaviour with a reasonable upper bound.
See https://github.com/carrotsearch/randomizedtesting/issues/131
2014-03-14 11:47:00 +01:00
Martijn van Groningen 6f8f773f8c Disabled query size estimation in percolator, because this is too expensive cpu wise.
Lucene's RamUsageEstimator.sizeOf(Object) is to expensive.
Query size estimation will be enabled when a cheaper way of query size estimation can be found.

Closes #5372
Relates to #5339
2014-03-14 15:29:24 +07:00
Bill Hwang 2e56253293 Added static analysis profile to pom.xml
Added pmd, findbug as well as site generation logic to top pom.xml file
Created customized pmd ruleset
2014-03-13 12:23:07 -07:00
Adrien Grand e3b87926bf [Build] Remove XReferenceManager and XSearcherManager from forbidden-apis' exclude list.
These classes have been removed on the upgrade to Lucene 4.7.
2014-03-12 15:06:39 +01:00
Igor Motov 39d2377be6 Use patched version of TermsFilter to prevent using wrong cached results
See LUCENE-5502

Closes #5363
2014-03-11 20:48:22 -04:00
Shay Banon 8cfff9d796 jackson: upgrade to 2.3.2 2014-03-09 23:40:43 +01:00
Shay Banon 3ea746c45e mvel: upgrade to 2.1.9 2014-03-09 22:56:09 +01:00
Shay Banon 992747a159 Force merges to not happen when indexing a doc / flush
Today, even though our merge policy doesn't return new merge specs on SEGMENT_FLUSH, merge on the scheduler is still called on flush time, and can cause merges to stall indexing during merges. Both for the concurrent merge scheduler (the default) and the serial merge scheduler. This behavior become worse when throttling kicks in (today at 20mb per sec).

In order to solve it (outside of Lucene for now), we wrap the merge scheduler with an EnableMergeScheduler, where, on the thread level, using a thread local, the call to merge can be enabled/disabled.

A Merges helper class is added where all explicit merges operations should go through. If the scheduler is the enabled one, it will enable merges before calling the relevant explicit method call. In order to make sure Merges is the only class that calls the explicit merge calls, the IW variant of them is added to the forbidden APIs list.

closes #5319
2014-03-05 12:26:26 +00:00
Zachary Tong 7b16c5857d Percentiles aggregation.
A new metric aggregation that can compute approximate values of arbitrary
percentiles.

Close #5323
2014-03-03 18:06:14 +01:00
Simon Willnauer 8ceb98752d Move master to Java 1.7
Closes #5267
2014-02-27 15:12:02 +01:00
Simon Willnauer 30d7b8de2f Upgrade to Lucene 4.7
Closes #5104
Closes #5129
Closes #3757
2014-02-26 22:21:10 +01:00
Bill Hwang db57f7ed0e Add thrid party license generation profile 2014-02-20 10:05:10 -08:00
Isabel Drost-Fromm 48004ff8a5 Add mustache templating to query execution.
Adds support for storing mustache based query templates that can later be filled
with query parameter values at execution time. Templates may be both quoted,
non-quoted and referencing templates stored in config/scripts/*.mustache by file
name.

See docs/reference/query-dsl/queries/template-query.asciidoc for templating
examples.

Implementation detail: mustache itself is being shaded as it depends directly on
guava - so having it marked optional but included in the final distribution
raises chances of version conflicts downstream.

Fixes #4879
2014-02-20 12:21:59 +01:00
mrsolo dffc7cd06d code coverage hookup 2014-02-14 10:05:40 -08:00
Simon Willnauer ab97bf0fd9 s/\t/ / 2014-02-07 13:35:58 +01:00
Simon Willnauer 0fb8d982be Use patched version of ReferenceManager to prevent infinite loop in
RefrenceManager#accquire()

See LUCENE-5436
2014-02-06 21:45:38 +01:00
Simon Willnauer 9cf8251a0d Add RamUsageEstimator#sizeOf(Object) to forbidden APIs
This method can be a performance trap since it traverse the
entire object tree that is referenced by the provided object.
See LUCENE-5373
2014-01-31 21:43:20 +01:00
Simon Willnauer 91acca7836 Upgrade to Lucene 4.6.1
This upgrade includes a fix for RAM estimation on IndexReader
that allows to expose the amount of used bytes per segment now
as a setting in Elasticsearch. (LUCENE-5373)

Additionally this bugfix release contained a small fix for highlighting
that was already ported to Elasticsearch when reported (LUCENE-5361)

Closes #4897
2014-01-28 10:35:39 +01:00
Simon Willnauer 25b49dd50b Install SecurityManager inside ElasticsearchTestCase for easier randomization
We currently run always with SecurityManager installed. To make sure we
work also without we should randomly swap it out ie. run without the
security manager.
2014-01-24 22:18:05 +01:00
Simon Willnauer 55e8df40cd Move provided lucene-expression jar below the test-framework
Having a dep that refrences lucene-core before the test framework
confuses some runners.
2014-01-23 16:10:57 +01:00
Simon Willnauer 416e328cea Mark 'lucene-expression' as 'provided' in pom.xml
We currently pull in the lucene-expression module that is referenced
by lucene-suggest. Yet, we don't make use of this dependency at all
and it pulls in a bunch of unshaded libs like `antlr` and `asm` which
are pretty common in other projects. We should exclude this
dependency since we don't use it at all and it causes problems
when Elasticsearch is used as a node client. (see #4858)

If we mark the dependency as provided it won't be included in the
distribution.

Closes #4859
Closes #4858
2014-01-23 14:23:41 +01:00
Simon Willnauer 53192919c6 Move to [2.0] snap 2014-01-21 17:07:39 +01:00
Shay Banon f1174eac3a upgrade to guava 16.0
also fixes #4830
2014-01-21 15:26:03 +01:00
Simon Willnauer 7f51fbc5ab Add SecurityManger / policy when running tests.
This commit adds a security manager to the test JVMs
that prevents mainly writing files outside of the JVMs
current test directory.
2014-01-17 15:15:10 +01:00
Simon Willnauer 85ca6c6762 move to [1.0.0] SNAP 2014-01-16 10:28:38 +01:00
Alexander Reelsen c6155c5142 release [1.0.0.RC1] 2014-01-15 17:02:22 +00:00
David Pilato c386155a73 add MockPageCacheRecycler in test jar
MockPageCacheRecycler is missing in test jar which makes failing tests when using
test jar in plugins:

```
1> [2014-01-11 10:51:30,531][ERROR][test                     ] FAILURE  : testWikipediaRiver(org.elasticsearch.river.wikipedia.WikipediaRiverTest)
  1> REPRODUCE WITH  : mvn test -Dtests.seed=5DAFD4FBAE587363 -Dtests.class=org.elasticsearch.river.wikipedia.WikipediaRiverTest -Dtests.method=testWikipediaRiver -Dtests.prefix=tests -Dtests.network=true -Dfile.encoding=MacRoman -Duser.timezone=Europe/Paris -Des.logger.level=INFO -Des.node.local=true -Dtests.cluster_seed=134842C2D806FFC0
  1> Throwable:
  1> java.lang.NoClassDefFoundError: org/elasticsearch/cache/recycler/MockPageCacheRecycler
  1>     org.elasticsearch.test.cache.recycler.MockPageCacheRecyclerModule.configure(MockPageCacheRecyclerModule.java:30)
  1>     org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)
```

Closes #4694.
2014-01-13 09:06:59 +01:00
Shay Banon ffe3537285 no need for the mvn repository anymore 2014-01-12 00:26:34 +01:00
mrsolo 2df42e4460 Added licene-maven-plugin to build
The plugin adds basic checks for license headers. At
this stage we only enable checks for java source files.
Other files are omitted at this point.
2014-01-10 22:04:48 +01:00
Shay Banon 3262398347 give the compiler more memory, otherwise it fails sometimes 2014-01-09 11:25:59 +01:00
Shay Banon 0eaed0da26 add joda-convert so missing annotations in joda-time will not cause failures when used as dependency
fixes #4660
2014-01-08 22:14:44 +01:00
Simon Willnauer fa16969360 Cleanup comments and class names s/ElasticSearch/Elasticsearch
* Clean up s/ElasticSearch/Elasticsearch on docs/*
 * Clean up s/ElasticSearch/Elasticsearch on src/* bin/* & pom.xml
 * Clean up s/ElasticSearch/Elasticsearch on NOTICE.txt and README.textile

Closes #4634
2014-01-07 11:21:51 +01:00
Adrien Grand 4271d573d6 Page-based cache recycling.
Refactor cache recycling so that it only caches large arrays (pages) that can
later be used to build more complex data-structures such as hash tables.

 - QueueRecycler now takes a limit like other non-trivial recyclers.
 - New PageCacheRecycler (inspired of CacheRecycler) has the ability to cache
   byte[], int[], long[], double[] or Object[] arrays using a fixed amount of
   memory (either globally or per-thread depending on the Recycler impl, eg.
   queue is global while thread_local is per-thread).
 - Paged arrays in o.e.common.util can now optionally take a PageCacheRecycler
   to reuse existing pages.
 - All aggregators' data-structures now use PageCacheRecycler:
   - for all arrays (counts, mins, maxes, ...)
   - LongHash can now take a PageCacheRecycler
   - there is a new BytesRefHash (inspired from Lucene but quite different,
     still; for instance it cheats on BytesRef comparisons by using Unsafe)
     that also takes a PageCacheRecycler

Close #4557
2014-01-06 19:02:00 +01:00
Simon Willnauer e7a84d744a Add ability to run certain packages with assertions disabled
Test can be run with `-Dtests.assertion.disabled=org.elasticsearch`
to run the tests without assertions to make sure assertions
don't hide any assignements etc. that introduce bugs in production.
2013-12-30 19:36:02 +01:00
David Pilato b29f89f7f9 We run PluginManagerTests using only node client.
We also add some debug logs and fix `tests.network` (setting it to true was not working from jenkins)
2013-12-30 15:40:52 +01:00
David Pilato 7694f0b7a0 Increase MaxPermSize to 128m for tests 2013-12-30 09:56:47 +01:00
Simon Willnauer 11c4218566 Start Test nodes sometimes without mock modules
We are mocking out some functionality to add assertions etc. or
randomize store types. We should randomly run with our defaults to make
sure we don't hide any potential problems.
2013-12-29 00:50:10 +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 e5f52ce778 update to netty 3.9.0 2013-12-23 20:06:45 +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
Simon Willnauer 8f85d63b67 Enable incremental compilation using a workaround for the maven-compiler-plugin 3.1 bug 2013-12-14 21:56:01 +01:00
Shay Banon 59d85bc22a upgrade to Jackson 2.3.0 2013-12-14 00:53:52 +01:00
Alexander Reelsen 81e13a870b Packaging: Ensure setting of sysctl vm.max_map_count
In order to be sure that memory mapped lucene directories are working
one can configure the kernel about how many memory mapped areas
a process may have. This setting ensure for the debian and redhat initscripts
as well as the systemd startup, that this setting is set high enough.

Closes #4397
2013-12-11 09:19:22 +01:00
Simon Willnauer 2b42a0f94a Override DefaultExceptionHandler to filter out certain exceptions
We have the situation that some tests fail since they don't handle
EsRejectedExecutionException which gets thrown when a node shuts
down. That is ok to ignore this exception and not fail.
We also suffer from OOMs that can't create native threads but don't
get threaddumps for those failures. This patch prints the thread
stacks once we catch a OOM which can' create native threads.
2013-12-04 14:18:52 +00:00
mrsolo 3494ac252e removing test.jvm.argline declaration
<properties> declaration was overwriting environment setting.
2013-12-02 11:44:51 -08:00
Simon Willnauer 2c8ee3fbbe Moving to 1.0.0RC1 snap 2013-12-02 17:10:07 +01:00
Kevin Kluge 296cfbe390 release [1.0.0.Beta2] 2013-12-02 15:45:30 +00:00
David Pilato fa762f09fa OOM when building with java6
The maven-compiler-plugin upgrade from 2.3.2 to 3.1 (see #4279) could cause out of memory issue when building the project with Maven and JDK6 and default memory settings (no `MAVEN_OPTS`).

This issue does not appear with JDK7.
2013-11-28 18:22:29 +01:00
David Pilato baaa1a6aa2 Upgrade Maven Surefire Plugin to 2.16
Closes #4275.
2013-11-28 14:56:51 +01:00
David Pilato 90c3fce4fe Upgrade Maven Source Plugin to 2.2.1
Closes #4276.
2013-11-28 14:56:34 +01:00
David Pilato 975c43f6d5 Upgrade RPM Maven Plugin to 2.1-alpha-3
Closes #4282.
2013-11-28 14:56:20 +01:00
David Pilato d18f0a28d9 Upgrade Maven Resources Plugin to 2.6
Closes #4280.
2013-11-28 14:56:07 +01:00
David Pilato fa0a5e5844 Upgrade Maven Jar Plugin to 2.4
Closes #4281.
2013-11-28 14:55:53 +01:00
David Pilato 2b32121e34 Upgrade Maven Eclipse Plugin to 2.9
Closes #4277.
2013-11-28 14:55:40 +01:00
David Pilato eac602ec70 Upgrade Maven Dependency Plugin to 2.8
Closes #4274.
2013-11-28 14:52:58 +01:00
David Pilato b1c62b02b0 Upgrade Maven Compiler Plugin to 3.1
Closes #4279.
2013-11-28 14:52:32 +01:00
David Pilato 79d92dffa6 Upgrade Maven Assembly Plugin to 2.4
Closes #4278.
2013-11-28 14:49:51 +01:00
David Pilato 5ec0bf32d6 Remove randomizedtesting-runner explicit dependency
Was added by mistake with #4266
2013-11-28 12:07:21 +01:00
David Pilato a9655ba812 Update to shade plugin 2.2 to shade test artifact as well
When we want to use test artifact in other projects, dependencies
are not shaded as for core artifact.

Issue opened in maven shade project: [MSHADE-158](http://jira.codehaus.org/browse/MSHADE-158)

When using it in other projects, you basically need to change your `pom.xml` file:

```xml
<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>${elasticsearch.version}</version>
    <type>test-jar</type>
    <scope>test</scope>
</dependency>
```

You can also define some properties:

```xml
<properties>
    <tests.jvms>1</tests.jvms>
    <tests.shuffle>true</tests.shuffle>
    <tests.output>onerror</tests.output>
    <tests.client.ratio></tests.client.ratio>
    <es.logger.level>INFO</es.logger.level>
</properties>
```

Closes #4266
2013-11-28 10:54:48 +01:00
Simon Willnauer 5f7146aab8 Run tests with reduced stack size as we run in production 2013-11-26 11:16:02 +01:00
Simon Willnauer cf3ba7c51c Only use -Dtests.jvm.argline instead of numbered options 2013-11-26 11:11:19 +01:00
Simon Willnauer 46ab6a1533 Include JVM Arg line in reproduce line 2013-11-25 14:35:34 +01:00
Simon Willnauer 8e17d636ef Upgrade to Lucene 4.6
This commit upgrades to Lucene 4.6 and contains the following improvements:

 * Remove XIndexWriter in favor of the fixed IndexWriter
 * Removes patched XLuceneConstantScoreQuery
 * Now uses Lucene passage formatters contributed from Elasticsearch in PostingsHighlighter
 * Upgrades to Lucene46 Codec from Lucene45 Codec
 * Fixes problem in CommonTermsQueryParser where close was never called.

Closes #4241
2013-11-24 21:08:38 +01:00
Simon Willnauer eb55458e44 Upgrade RandomizedRunner Maven Plugin to 2.0.14 2013-11-22 15:00:12 +01:00
Simon Willnauer a949a8056b Upgrade to forbiddenapis 1.4 2013-11-22 08:01:30 +01:00
Simon Willnauer 00562d3a6f allow passing JVM args via env variables if not defined via the cmd 2013-11-21 17:58:43 +01:00
Simon Willnauer 02522dac06 Allow passing additional parameters to the test JVM like GC settings etc. 2013-11-21 17:39:11 +01:00
colings86 76c5f53dfa Changed pom to allow import and running from eclipse
Currently when importing projects into eclipse you need to run 'mvn
eclipse:eclipse' on the command line to generate the poject files. This
means that when the pom changes you need to re-run the command on the
command line to reflect those changes in the project in eclipse.  This
commit allows the developer to import the project as an existing maven
project (can be shared using git after import) and then allows the
application to be run inside eclipse using the .launch file in
/dev-tools enabling easy debugging of the application within eclipse
without requiring a maven build.
2013-11-21 10:56:52 +01:00
Simon Willnauer c48c8fd974 Include inner classes in the test package as well 2013-11-14 13:49:37 +01:00
Simon Willnauer 16ee742682 Cleanup test framework in order to release it as a jar file
This commit adds javadocs and removed unused methods from central
classes like ElasticsearchIntegrationTest. It also changes visibility
of many methods and classes that are only needed inside the test infrastructure.
2013-11-12 11:54:55 +01:00
Martijn van Groningen 9fdcb0ad05 Upgraded to hppc version 0.5.3 2013-11-11 14:27:52 +01:00
Shay Banon b17732ea56 upgrade to Netty 3.8.0 2013-11-09 15:41:24 +01:00
Simon Willnauer 985916038e Just filter test jar and not the main jar file 2013-11-08 23:14:56 +01:00
Simon Willnauer a824f69d21 Package test-framework as individual jar
This commit causes all classes under 'org.elasticsearch.test.*'
to be included in a 'elasticsearch-${version}-test.jar' that can be
inclued by 3rd party projects or plugins via:

```
 <dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>${elasticsearch.version}</version>
    <type>test-jar</type>
    <scope>test</scope>
 </dependency>
```
2013-11-08 15:08:31 +01:00
Simon Willnauer c946a69e28 Set MaxDirectMemorySize for tests to have consistent upper bounds 2013-11-07 09:44:19 +01:00
Simon Willnauer e1b6988886 move to [1.0.0.Beta2] SNAP 2013-11-06 16:19:50 +01:00
Simon Willnauer 77bc5d5ecf release [1.0.0.Beta1] 2013-11-06 15:32:43 +01:00
Shay Banon 75eda6e957 upgrade randomized testing to 2.0.12 2013-10-31 10:02:03 +01:00
Simon Willnauer 3a34aa735e Upgrade to Lucene 4.5.1 2013-10-24 18:37:44 +02:00
Simon Willnauer 0eea6e8183 Enable Random TransportClients in tests 2013-10-10 13:23:02 +02:00
Adrien Grand 6b02611971 Update Lucene to version 4.5.0. 2013-10-08 15:44:03 +02:00
Martijn van Groningen 088e05b368 Migrate from Trove to Hppc. 2013-10-03 23:10:57 +02:00
Simon Willnauer 8f087e802d Print Java Version during Validate 2013-09-27 14:39:07 +02:00
Simon Willnauer 5a365795ec Added support for dynamic transport client ratio in tests.
Currently tests only run with node clients but eventually we want to
run all tests with randomly choosen node / transport clients. To enable
this during development and on test servers as a transition phase this
commit adds the ability to allow a fraction of the clients used in
tests to be transport clients. By default this is still disabled.
To enable transport clients in tests pass '-Dtests.client.ratio=[0..1]'
where '1.0' will force transport clients and '0.0' completely disables
them. If an empty string is passed the ratio is chosen at random for
each test.
2013-09-22 22:25:30 +02:00
Simon Willnauer cabbf7805b Make TestCluster based integration tests more repoducible
While testing an async system providing reproducible tests that
use randomized components is a hard task we should at least try to
reestablish the enviroment of a failing test as much as possible.
This commit allows to re-establish the shared 'TestCluster' by
resetting the cluster to a predefined shared state before each test.

Before this commit a tests that is executed in isolation was likely
using a entirely different node enviroment as the failing test since
the 'TestCluster' kept intermediate nodes started by other tests around.
2013-09-17 23:07:29 +02:00
Shay Banon e110d53b0c change default number of test jvms to 1
the auto default can cause a lot of pressure on a machine when running the tests (each process actually runs a multi node cluster)
2013-09-17 21:30:27 +02:00
Costin Leau dcc45070bd Merge pull request #3702 from costin/master
add elasticsearch as a service for Windows platforms
2013-09-17 05:16:29 -07:00
Costin Leau 08bf131899 rework script to handle path with spaces
use service id for pid name
disable filtering on *.exe (caused corruption)
rename exe names and add more options to .bat
start/stop operations are now supported (and expected to be called) by service.bat
add more variables from the env to customize default behavior prior to installing the service
add manager option
fixes regarding batch flow
specify service id in description
minor readability improvement
include .exe only in ZIP archive
rename x64 service id to make it work out of the box
add elasticsearch as a service for Windows platforms
based on Apace Commons Daemon
supports both x64 and x86
2013-09-17 15:01:09 +03:00
Shay Banon ae0489266e Add `node.mode` with `local` or `network`
Compared to setting node.local to true, would be nicer to support node.mode with values of local or network.

Note, node.local is still supported.

closes #3713
2013-09-17 00:34:10 +02:00
Shay Banon 88173d762a upgrade to jackson 2.2.3 2013-09-16 15:38:47 +02:00
Shay Banon 31097691af upgrade to netty 3.7.0 2013-09-16 15:05:28 +02:00
Shay Banon cd90382964 upgrade to google guava v 15 2013-09-16 09:14:00 +02:00
Simon Willnauer 0e936c99e3 Add -Dtests.integration support to pom.xml 2013-09-11 22:16:43 +02:00
Simon Willnauer e68303d6a6 Allow test output to be configurable via CMD 2013-09-04 12:46:43 +02:00
Adrien Grand 5b6be0c456 Use a separate build directory for Eclipse.
The fact that Maven and Eclipse share the same build directories can trigger
race conditions when both are trying to build at the same time, eg. if you run
`mvn clean test` while Eclipse is up and running: Eclipse will notice that some
class files are missing and start compiling in parallel with Maven.
2013-08-29 10:29:26 +02:00
Shay Banon f3a35ccc90 upgrade to joda 2.3 2013-08-24 00:07:57 +02:00
Boaz Leskes 9869427ef6 Allow to configure root logging level using system properties. Ex. -Des.logger.level=DEBUG . Defaults to INFO as before. 2013-08-15 14:36:00 +02:00
Simon Willnauer ba13930b32 Fix test include pattern to include *Test.class
We missed *Test.class which is not our convention but we could miss
some tests. We should better include the *Test.class tests as well.
2013-08-13 17:46:48 +02:00
Simon Willnauer 59be83f9fc Remove accidentially committed default values
`-Dtests.maxFailures` and `-Dtests.failfast` should not be enabled
by default.
2013-08-12 14:32:04 +02:00
Simon Willnauer dbed36a13f Added support for `tests.failfast` and `tests.maxiters`
This commit adds support for failing fast when running a test
case with `-Dtests.iters=N` and uses some goodness from LuceneTestCase
in a new base `AbstractRandomizedTest`. This class checks among other
things if a tests doesn't call `super.setup` / `super.tearDown` when it
should do and checks if a large static resources are not cleaned up
after the tests ie. a running node.
2013-08-12 13:18:56 +02:00
Alexander Reelsen 68b77c1ae3 Included only runtime dependencies when copying
This makes sure, that no test dependencies are placed in the distribution
2013-08-06 15:13:25 +02:00
Shay Banon 976152b23e enable sys out check + remove unused code 2013-07-26 18:57:21 +02:00
Shay Banon 70bbcb4c48 Add Git build info when we build a distribution
closes #3370
2013-07-24 20:24:23 +02:00
Simon Willnauer ed473e272d Cut over to JUnit & Randomized Runner from TestNG
For better integration with the Lucene Test Framework and the
availabilty of RandomizedRunner / Randommized Testing this commit
moves over from TestNG to JUnit.
This commit also moves relevant places over to RandomzedRunner for
reproduceability and removes copied classes from the Lucene Test
Framework.
2013-07-24 16:59:36 +02:00
Simon Willnauer 2e9851138e Upgrade to Lucene 4.4 2013-07-23 13:55:15 +02:00
Alexander Reelsen 3162f5b725 Updated maven shade plugin to version 2.1
The currently used maven shade plugin still keeps references to the
original classes in their constant pools around. This is never a problem
at runtime, but for dependency tools which try to use the constant pool
for determining dependencies will get confused (OSGI for example). This
patch simply bumps the version and will implicetely fix
fix http://jira.codehaus.org/browse/MSHADE-105

Closes #3254
Closes #3255
2013-07-04 15:57:13 +02:00
Alexander Reelsen 455bc32460 Moving forbidden-api checks to compile phase instead of test phase (fail fast) 2013-06-28 13:12:52 +02:00
Shay Banon 0114fb0f58 add running the tests in headless mode in maven 2013-06-27 23:23:13 +01:00
Adrien Grand 1954f770a1 Put Eclipse settings in the root directory.
This enforces that settings are taken into account whichever mean is used to
import the project into Eclipse (manual import, m2e, mvn eclipse:eclipse, ...).
2013-06-26 16:51:47 +02:00
Simon Willnauer a388588b1f Upgrade to Lucene 4.3.1 2013-06-18 22:15:31 +02:00
Shay Banon f155525cad upgrade jackson to 2.2.2, netty to 3.6.6 2013-06-11 20:36:08 +02:00
Alexander Reelsen a5f9173e14 Making deb installable by being lintian compatible
According to #2515 the ubuntu software center does not allow to install
debian packages which are not lintian compatible

I worked on the package and made it lintian compatible by doing

* Ignoring errors about arch dependent binaries as we will not split
  this package. The arch dependent libraries are used correctly.
* Added a copyright file pointing to the apache license in debian

Closes #2515
Closes #2320
2013-06-07 13:53:14 +02:00
Alexander Reelsen 183bb76371 Ensure config files are not overwritten in RPM upgrade
In order to ensure that configuration files do not get overwritten when
upgrading an RPM, it is not sufficient to mark them as configuration. You
have to use the 'noreplace' parameter to make sure, they are never
overwritten. Added this parameter for the /etc/elasticsearch directory
as well as the /etc/sysconfig/elasticsearch file.

In addition, the post remove script now only deletes the user in case of
a package removal (and does nothing on package upgrade).

Closes #3123
2013-05-31 16:26:10 +02:00
Adrien Grand c16a46e15c Make it easier to get started with Eclipse.
This patch makes mvn eclipse:eclipse generate additional eclipse configuration
files so that Eclipse:
 - uses Java 1.6 compliance level,
 - truncates lines after 140 chars,
 - uses 4 spaces for indentation,
 - automatically adds a license header when creating a new class file,
 - organizes imports the same way as Intellij Idea (which makes sense I guess
   since most of the code bas has been written with Intellij, this will prevent
   from having large diffs due to the fact that the order of imports has
   changed).
2013-05-30 16:48:58 +02:00
Simon Willnauer 31f0aca65d Integrate forbiddenAPI checks into Maven build.
This commit integrates the forbiddenAPI checks that checks
Java byte code against a list of "forbidden" API signatures.
The commit also contains the fixes of the current source code
that didn't pass the default API checks.

See https://code.google.com/p/forbidden-apis/ for details.

Closes #3059
2013-05-19 23:25:44 +02:00
Shay Banon 2ab72da7d6 update to joda 2.2 2013-05-11 23:37:56 +02:00
Shay Banon e09e3eb73b upgrade to mvel 2.1.5 2013-05-11 23:17:00 +02:00
Shay Banon 522ca7e889 upgrade to jackson 2.2.1 2013-05-09 18:00:23 +02:00
Simon Willnauer 2219925485 Upgrade to Lucene 4.3.0
This Lucene Release introduced a new API on DocIdSetIterator that requires each
implementation to return a `cost` upperbound as a function of the iterated documents.
This API allows for several optimizations during query execution especially in
Conjunction and Disjunction Queries with min_should_match set.

Closes #2990
2013-05-06 18:03:16 +02:00
Shay Banon 6c3bb4dcdd move to 1.0.0.Beta1 snap 2013-04-29 13:51:09 +02:00
Shay Banon cb75ce0caa release 0.90.0 GA 2013-04-29 13:41:43 +02:00
Shay Banon 80fc55a01d upgrade to netty 3.6.5 2013-04-09 09:44:49 -07:00
Shay Banon 3120457bfe move to 0.90.0.RC3 snap 2013-04-08 05:48:29 -07:00
Shay Banon 3a8cba4d50 release 0.90.0.RC2 2013-04-08 05:46:26 -07:00
Simon Willnauer eb8b38d027 Upgrade to Lucene 4.2.1 2013-04-03 12:22:39 +02:00