Commit Graph

14573 Commits

Author SHA1 Message Date
Robert Muir ead4f0fe1f Merge pull request #12660 from rmuir/improve_integ_tests
improve integration tests output when ES cannot be started.
2015-08-04 22:52:10 -04:00
Robert Muir 3c9fb6f3a2 improve integration tests output when ES cannot be started.
This can happen for a number of reasons, including bugs.
Today you will get a super crappy failure, telling you a .pid file
was not found... you can go look in target/integ-tests/elasticsearch-xxx/logs
and examine the log file, but thats kinda a pain and not easy if its a jenkins
server.

Instead we can fail like this:
```
start-external-cluster-with-plugin:
     [echo] Installing plugin elasticsearch-example-jvm-plugin...
    [mkdir] Created dir: /home/rmuir/workspace/elasticsearch/plugins/jvm-example/target/integ-tests/temp
     [exec] -> Installing elasticsearch-example-jvm-plugin...
     [exec] Plugins directory [/home/rmuir/workspace/elasticsearch/plugins/jvm-example/target/integ-tests/elasticsearch-2.0.0-SNAPSHOT/plugins] does not exist. Creating...
     [exec] Trying file:/home/rmuir/workspace/elasticsearch/plugins/jvm-example/target/releases/elasticsearch-example-jvm-plugin-2.0.0-SNAPSHOT.zip ...
     [exec] Downloading ...........DONE
     [exec] PluginInfo{name='example-jvm-plugin', description='Demonstrates all the pluggable Java entry points in Elasticsearch', site=false, jvm=true, classname=org.elasticsearch.plugin.example.ExampleJvmPlugin, isolated=true, version='2.0.0-SNAPSHOT'}
     [exec] Installed example-jvm-plugin into /home/rmuir/workspace/elasticsearch/plugins/jvm-example/target/integ-tests/elasticsearch-2.0.0-SNAPSHOT/plugins/example-jvm-plugin
     [echo] Starting up external cluster...
     [echo] [2015-08-04 22:02:55,130][INFO ][org.elasticsearch.node   ] [smoke_tester] version[2.0.0-SNAPSHOT], pid[4321], build[e2a47d8/2015-08-05T00:50:08Z]
     [echo] [2015-08-04 22:02:55,130][INFO ][org.elasticsearch.node   ] [smoke_tester] initializing ...
     [echo] [2015-08-04 22:02:55,259][INFO ][org.elasticsearch.plugins] [smoke_tester] loaded [uber-plugin], sites []
     [echo] [2015-08-04 22:02:55,260][ERROR][org.elasticsearch.bootstrap] Exception
     [echo] java.lang.NullPointerException
     [echo] 	at org.elasticsearch.common.settings.Settings$Builder.put(Settings.java:1051)
     [echo] 	at org.elasticsearch.plugins.PluginsService.updatedSettings(PluginsService.java:208)
     [echo] 	at org.elasticsearch.node.Node.<init>(Node.java:148)
     [echo] 	at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:157)
     [echo] 	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:177)
     [echo] 	at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:272)
     [echo] 	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:28)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.178 s
[INFO] Finished at: 2015-08-04T22:03:14-05:00
[INFO] Final Memory: 32M/515M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (integ-setup) on project elasticsearch-example-jvm-plugin: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/rmuir/workspace/elasticsearch/plugins/jvm-example/target/dev-tools/ant/integration-tests.xml:176: The following error occurred while executing this line:
[ERROR] /home/rmuir/workspace/elasticsearch/plugins/jvm-example/target/dev-tools/ant/integration-tests.xml:142: ES instance did not start
```
2015-08-04 22:16:30 -04:00
Igor Motov f71c9a25a1 Check for incompatible mappings while upgrading old indices
Conflicting mappings that were allowed before v2.0 can cause runaway shard failures on upgrade. This commit adds a check that prevents a cluster from starting if it contains such indices as well as restoring such indices from a snapshot into already running cluster.

Closes #11857
2015-08-04 18:13:29 -06:00
Xu Zhang 984b94e8b7 Merge pull request #12498 from xuzha/xu-retry-s3snapshot
Adding retry when checking s3 snapshot repository
2015-08-04 16:11:01 -07:00
xuzha 333ca689d3 Add retry when checking s3 bucket 2015-08-04 15:58:15 -07:00
Igor Motov 8fe5d903b7 Add support for bulk delete operation in snapshot repository
Currently when we delete files belonging to deleted snapshots we issue one delete command to underlying snapshot store at a time. Some repositories can benefit from bulk deletes of multiple files.

Closes #12533
2015-08-04 14:52:28 -06:00
Robert Muir 39508c4d7a Merge pull request #12653 from rmuir/look_ma_im_a_snapshot_again
Change master branch back to 2.0-beta1
2015-08-04 16:10:59 -04:00
Tanguy Leroux cf6acbd7c2 Remove obsolete plugins.info_refresh_interval setting
This setting has been removed in  #12367
2015-08-04 21:46:31 +02:00
Robert Muir 6f9a067197 Change master branch back to 2.0-beta1 2015-08-04 15:38:21 -04:00
Clinton Gormley 17922d25b8 Change license-check script to work with perl 5.8 2015-08-04 21:31:31 +02:00
Nik Everett d8380c1a2a Merge pull request #12584 from whitej17/patch-1
Change capitalization of "as"
2015-08-04 15:25:13 -04:00
Nik Everett b9e1c581e8 Merge pull request #12647 from loopmachine/nested-type-doc
Update nested-type.asciidoc mapping example
2015-08-04 14:45:08 -04:00
loopmachine 5de2044c5b Update nested-type.asciidoc mapping example 2015-08-04 14:02:03 -04:00
Robert Muir 29d73accdd Merge pull request #12639 from rmuir/improve_integ
Don't use port 9200/9300 for integration tests
2015-08-04 13:09:47 -04:00
David Pilato 38b1ed302f Merge pull request #12642 from elastic/maven/distribution-groupid
[build] mvn install renames artifacts when copying
2015-08-04 16:26:38 +02:00
Robert Muir abb43c3cc6 Merge branch 'master' into maven/distribution-groupid 2015-08-04 10:00:59 -04:00
Robert Muir f1019ace3b Fix plugins integ dependencies and apply cleanups 2015-08-04 09:59:19 -04:00
Simon Willnauer 8e250d6072 Merge pull request #12640 from s1monw/issues/12603
Ignore EngineClosedException on IndexShard#sync
2015-08-04 15:57:51 +02:00
Simon Willnauer 8f6e75b158 Ignore EngineClosedException on IndexShard#sync
This method syncs the translog unless it's already synced. If the engine
is alreayd closed we are guaranteed to be synced already such that we can just
ignore this exception.

Closes #12603
2015-08-04 15:43:17 +02:00
Simon Willnauer 96ad1911fd Use correct classname in all-signatures.txt 2015-08-04 15:36:18 +02:00
David Pilato c61dccd189 Packaging: mvn install renames artifacts when copying
This PR:

* renames all distribution artifacts to `elasticsearch` so maven plugins will pick up the correct finalName without needing any hack.
* changes the groupId for every single distribution module as we can't have more than one module using the same groupId:artifactId
* does not attach anymore empty jar files for tar/zip/... modules as they don't contain any `src/main/java` stuff.

When you build it, you end up with:

```
$ tree ~/.m2/repository/org/elasticsearch/distribution
distribution
├── deb
│   └── elasticsearch
│       ├── 2.0.0-beta1-SNAPSHOT
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.deb
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.deb.md5
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.deb.sha1
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5
│       │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1
├── elasticsearch-distribution
│   ├── 2.0.0-beta1-SNAPSHOT
│   │   ├── elasticsearch-distribution-2.0.0-beta1-SNAPSHOT.pom
│   │   ├── elasticsearch-distribution-2.0.0-beta1-SNAPSHOT.pom.md5
│   │   └── elasticsearch-distribution-2.0.0-beta1-SNAPSHOT.pom.sha1
├── fully-loaded
│   └── elasticsearch
│       ├── 2.0.0-beta1-SNAPSHOT
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5
│       │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1
├── rpm
│   └── elasticsearch
│       ├── 2.0.0-beta1-SNAPSHOT
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.rpm
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.rpm.md5
│       │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.rpm.sha1
├── shaded
│   └── elasticsearch
│       ├── 2.0.0-beta1-SNAPSHOT
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.jar
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.jar.md5
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.jar.sha1
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5
│       │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1
├── tar
│   └── elasticsearch
│       ├── 2.0.0-beta1-SNAPSHOT
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.tar.gz
│       │   ├── elasticsearch-2.0.0-beta1-SNAPSHOT.tar.gz.md5
│       │   └── elasticsearch-2.0.0-beta1-SNAPSHOT.tar.gz.sha1
└── zip
    └── elasticsearch
        └── 2.0.0-beta1-SNAPSHOT
            ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom
            ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.md5
            ├── elasticsearch-2.0.0-beta1-SNAPSHOT.pom.sha1
            ├── elasticsearch-2.0.0-beta1-SNAPSHOT.zip
            ├── elasticsearch-2.0.0-beta1-SNAPSHOT.zip.md5
            ├── elasticsearch-2.0.0-beta1-SNAPSHOT.zip.sha1
            └──
```

Closes #12536
2015-08-04 15:34:11 +02:00
Robert Muir cf6fe6cdcd Don't use port 9200/9300 for integration tests 2015-08-04 09:25:44 -04:00
Nik Everett e8ccdf91fc Merge pull request #12610 from nik9000/bug/12504_2.0
Plugin script: Fix spaces
2015-08-04 09:05:38 -04:00
Clinton Gormley d0bd769b85 Added missing dependency to check-license script 2015-08-04 15:00:50 +02:00
Simon Willnauer 9b342733e0 Merge pull request #12636 from s1monw/forbid_default_timezone
Use UTC instead of default timezone for creation date in CAT endpoint
2015-08-04 14:54:43 +02:00
Simon Willnauer 2b2657279d Use UTC instead of default timezone for creation date in CAT endpoint
this change was added recently which uses default timezone for the creation
date on CAT endpoints. We should be consistent and use UTC across the board.
This commit adds #getDefaultTimzone() to forbidden API and fixes the REST tests.

Relates to #11688
2015-08-04 14:38:23 +02:00
Clinton Gormley 18cb9eb2ec Merge pull request #12631 from clintongormley/license_check_for_dirs
The check-license script now accepts either a directory or a .zip file only

Closes #12528
2015-08-04 14:17:57 +02:00
Robert Muir 5059c978e3 Fix distribution checks to pass unzipped directory to license checker 2015-08-04 07:54:55 -04:00
Clinton Gormley 20a5fc7e30 The check-license script now accepts either a directory or a .zip file only
Called as:

    check_license_and_sha.pl --check path/to/licenses path/to/extracted/package/

or

    check_license_and_sha.pl --check path/to/licenses path/to/file.zip
2015-08-04 13:07:58 +02:00
Simon Willnauer 6753f7f03e Cut over master to 2.0.0-SNAPSHOT 2015-08-04 10:54:12 +02:00
Tanguy Leroux a74684473e Move Streams.copyTo(String|Bytes)FromClasspath() into StreamsUtils
The Streams.copyTo(String|Bytes)FromClasspath() methods resolve resources using org.elasticsearch.io.Streams classloader. This is fine in elasticsearch core and when running tests but if used in a plugin this can lead to FileNotFoundExceptions at runtime because plugin are loaded in a dedicated classloader.
2015-08-04 10:11:18 +02:00
Adrien Grand caca13c878 Merge pull request #12599 from jpountz/fix/PrioritizedEsThreadPoolExecutor_concurrency
Fix concurrency issue in PrioritizedEsThreadPoolExecutor.
2015-08-04 10:00:46 +02:00
Adrien Grand 2433f34459 Merge pull request #12590 from Kakakakakku/fix-doc
Fixed official api name in docs
2015-08-04 09:54:32 +02:00
Robert Muir 32339c0e3f Merge pull request #12627 from rmuir/improve_site_integ_test
Improve site-example integ test to test served contents.
2015-08-03 23:58:19 -04:00
Robert Muir a0a177222b fix typo in assume() when running from IDE 2015-08-03 23:57:27 -04:00
Robert Muir 16da40eb63 Merge pull request #12626 from rmuir/fix_coverage_analysis
Fix coverage analysis. Two versions of jacoco were being used and creating jar hell
2015-08-03 23:56:48 -04:00
Robert Muir 64850c0539 Improve site-example integ test to test served contents.
Closes #12578
2015-08-03 23:47:36 -04:00
Robert Muir 0e0fef81b2 Fix coverage analysis. Two versions of jacoco were being used and creating jar hell 2015-08-03 23:08:18 -04:00
Robert Muir 45ad47581d tone down these stress tests 2015-08-03 22:47:24 -04:00
Robert Muir 3b7316fb8d Merge pull request #12625 from rmuir/git_sucks
NamingConventionTests should test subclasses of ESIntegTestCase end with IT
2015-08-03 21:57:14 -04:00
Robert Muir c059101fbb Fix missed test class 2015-08-03 21:56:43 -04:00
Robert Muir d7cf5cd6af NamingConventionTests should test subclasses of ESIntegTestCase end with IT
These are integration tests.
2015-08-03 21:34:53 -04:00
Robert Muir 9091f46602 Merge pull request #12624 from rmuir/faster_unit_tests
cleanup more abstract test class -> TestCase and integ -> IT
2015-08-03 21:19:51 -04:00
Robert Muir 2fe279d2a9 cleanup more abstract test class -> TestCase and integ -> IT 2015-08-03 21:07:21 -04:00
Ryan Ernst e713bf2151 Merge pull request #12623 from rjernst/fix/10659
Rename base tests cases to use "TestCase" suffix
2015-08-03 17:51:07 -07:00
Ryan Ernst 1e12d03252 Tests: Rename base tests cases to use "TestCase" suffix
Most of the abstract base test classes we have were previously @Ignored.
However, there were also some other tests ignored. Having two ways to
quiet tests is confusing, and clearly it has caused some tests
to get lost in the fold.

This change moves all base test classes to use the "TestCase" suffix,
which is not picked up by the test class name pattern. It also removes
@Ignore from (almost) all tests, and adds it to forbidden apis.
And since we were renaming, I shorted base test class names to use
"ES" instead of "Elasticsearch". I type this a lot of types a day,
and I have heard others express a similar desire for a shorter name.

closes #10659
2015-08-03 17:43:00 -07:00
Lee Hinman 127a04ef43 Don't access pgp.mit.edu over HTTP 2015-08-03 17:52:39 -06:00
Ryan Ernst f9df12363f Merge pull request #12619 from rjernst/cleanup/integ-test-refs
Remove references to tests.slow and tests.integration
2015-08-03 16:52:19 -07:00
Ryan Ernst d7544fb5a8 Tests: Remove references to tests.slow and tests.integration
Another follow up to #12617.
2015-08-03 16:49:42 -07:00
Ryan Ernst 3c5b43a5bd Merge pull request #12618 from rjernst/remove/forbid-slow-annotation
Forbid @Slow
2015-08-03 16:46:05 -07:00