Commit Graph

1346 Commits

Author SHA1 Message Date
Simon Willnauer 3f94b5a395 Merge pull request #13465 from s1monw/issues/13404
Don't be lenient if JarHell is found
2015-09-21 09:53:30 +02:00
Jason Tedor dea7989a0f Move method to CollectionUtils to reduce number of source files 2015-09-18 08:43:17 -04:00
Jason Tedor 702cf7be72 Replace Integers.checkedCast with built-in method 2015-09-18 08:43:17 -04:00
Jason Tedor f0e20cf594 Remove need for lenient tryParse method 2015-09-18 08:43:17 -04:00
Jason Tedor c281826702 Remove and forbid use of com.google.common.primitives.Ints
This commit removes and now forbids all uses of
com.google.common.primitives.Ints across the codebase. This is one of
many steps in the eventual removal of Guava as a dependency.

Relates #13224
2015-09-18 08:43:17 -04:00
Colin Goodheart-Smithe c8d1f7aa67 [TESTS] fix failing tests due to ParsingException rename 2015-09-18 13:28:48 +01:00
Colin Goodheart-Smithe a8368b5dcd Merge pull request #13631 from s1monw/refactor_query_parsing_exception
Rename QueryParsingException to a more generic ParsingException
2015-09-18 12:30:49 +01:00
Robert Muir 47025defa6 Remove this: we are gonna manage these right 2015-09-18 00:23:06 -04:00
Robert Muir a5127bb6b0 Fix intellij test logging 2015-09-18 00:16:01 -04:00
Robert Muir 3504fefb6b Add Intellij support for plugins with extra permissions.
graduate this from a hack for insecure plugins to something we can
live with for per-module/plugin permissions, it now works reasonably
in unit tests and with Intellij and Eclipse IDEs.

remove security warnings: we will deal with these issues in a secure
way, if we cannot, then the plugin shouldn't be in our core codebase.
2015-09-17 23:51:51 -04:00
Robert Muir 5e5e10c91b Merge pull request #13645 from rmuir/crazy_test_framework_again
Fix more issues with plugin unit tests and allow running from IDE.
2015-09-17 18:06:22 -04:00
Robert Muir 394b6265c3 Fix more issues with plugin unit tests and allow running from IDE.
This is the more sheisty business along the same lines as
https://github.com/elastic/elasticsearch/pull/13638

1 hour total adding the real functionality, days of wasted time
on simulated fake functionality to satisfy our crazy test framework...

I debugged on the problematic jenkins machine and I think issues are
from parsing the classpath and URL normalization etc (trailing slashes
vs not, etc in URLs). So I simplifed the code, to remove this completely,
inverting the logic so we just use an exclusion list instead of inclusion one.

I also allow tests for these plugins to run from the IDE (works at least for eclipse) too.
At least for eclipse this is even less realistic as it piles all the code (src and test)
into a single codebase, but it means you can *use it* and you just have to run mvn verify
before pushing as always. And as always... best effort.
2015-09-17 17:02:11 -04:00
Chris Earle dac7a33ff7 Merge pull request #8201 from pickypg/feature/groovy-compile-indy-8184
Enable indy (invokedynamic) compile flag for Groovy scripts by default
2015-09-17 16:43:34 -04:00
Chris Earle ce50269e0a Removing note about 7u60 from master, which is Java 8+ only 2015-09-17 16:43:22 -04:00
Michael McCandless 3a33388872 Catch IndexWriter 'files do not exist' assertion and throw EngineCreationFailureExc 2015-09-17 16:19:03 -04:00
Robert Muir ffe50d5021 really get groovy indy working 2015-09-17 16:09:21 -04:00
Robert Muir 3e626d0dd8 add paranoia 2015-09-17 16:09:20 -04:00
Robert Muir 7828460ef6 Give groovy scripts read access to groovy.indy.logging, needed for
IndyInterface bootstrap.
2015-09-17 16:09:20 -04:00
Chris Earle 6a779fc730 Adding support for invokedynamic with Groovy scripts. 2015-09-17 16:09:20 -04:00
Nicholas Knize 584aaa08f8 Fix RandomShapeGenerator to retry on JTS Assertion and RandomShapeException
A JTS bug causes a misinterpretation of polygon coordinates leading to an unhelpful "geom" AssertionError. While this assertion occurs approx 0.02% of the time it can lead to a misleading test failure. This patch catches the geom assertion and retries randomShapeCreation. For safety a threshold is set to prevent unlimited retrying - though 1 retry is typically sufficient for correcting the invalid shape.

closes #13551
2015-09-17 13:23:46 -05:00
Robert Muir 7898ba103e Merge pull request #13638 from rmuir/more_realistic_unit_tests_for_plugins_like_this
Better simulate problematic plugins permissions in unit tests.
2015-09-17 12:06:08 -04:00
Robert Muir 0fdc16927e Elaborate more on how this works 2015-09-17 11:51:00 -04:00
Robert Muir 9219af8106 Better simulate problematic plugins permissions in unit tests.
We don't have a plugin .zip for unit tests, so we can't do it
correctly. But we can approximate it better, so that if code
is simply missing an AccessController block at least tests will fail.
2015-09-17 10:17:17 -04:00
Clinton Gormley 312bf5a011 Remove workaround for V2_0_0_beta1 in VersionTests 2015-09-17 15:48:05 +02:00
Clinton Gormley f20473a2e4 Add version 2.0.0-beta2 2015-09-17 15:41:34 +02:00
Clinton Gormley a7042fd809 Add bwc indices for 2.0.0-beta1 and 2.0.0-beta2 2015-09-17 15:41:34 +02:00
Simon Willnauer ec6643b994 bring back fully qualified classname 2015-09-17 14:58:40 +02:00
Simon Willnauer effaaf0566 Rename QueryParsingException to a more generic ParsingException
this allows us to reuse this exception in more places rather than adding
new ones that are basically just subclasses.
2015-09-17 14:56:21 +02:00
Boaz Leskes a1e83f6f4f Test: don't use setDaemon in DiscoveryWithServiceDisruptionsIT. 2015-09-17 14:24:48 +02:00
Boaz Leskes 39f86a1abe Test: move LongGCDisruption from Thread.getAllStackTraces() to Thread.enumerate()
To allow it to run without the "modifyThreadGroup" permission.
2015-09-17 14:23:57 +02:00
Martijn van Groningen 1a8495d1d6 tests: Add to ability for a integration test to prevent specific templates from being wiped between tests. 2015-09-17 12:34:46 +02:00
Simon Willnauer e9713cbb7b Append new exceptions to the end otherwise backporting won't work 2015-09-17 11:14:59 +02:00
Simon Willnauer af9166d84d Use a dedicated id to serialize EsExceptions instead of it's class name.
Classnames change quickly due to refactorings etc. If that happens in a minor release
we loose the ability to deserialize the exceptoin coming from another node sicne we today
look it up by classname. This change uses a dedicated static id instead of the classname
to lookup the actual class.
2015-09-17 11:08:09 +02:00
Robert Muir dc0bebada1 Support tests for insecure plugins on systems with multiple fs roots. 2015-09-17 02:30:45 -04:00
Robert Muir d4e53d8393 fix compilation with ECJ (eclipse IDE etc) 2015-09-16 14:33:39 -04:00
Robert Muir 09d2188869 Merge branch 'master' into kill_more_bogus_permissions 2015-09-16 12:17:43 -04:00
Lee Hinman 37ba02ab21 [TEST] Fix incorrect location for greaterThanOrEqual fix 2015-09-16 10:10:42 -06:00
Robert Muir ba934c6bee Remove some bogus permissions only needed for tests.
Especially the worst of the worst with thread permissions: for example,
this prevents some code from starting daemon thread that will outlive
the elasticsearch process and hang around doing evil shit.
2015-09-16 12:07:18 -04:00
Michael McCandless 0060a749ca Fix test case to verify the AssertionError did in fact come from IndexWriter.filesExist 2015-09-16 04:59:36 -04:00
Jason Tedor 30a7795119 Remove unused import in o.e.c.u.i.Iterables 2015-09-16 04:51:06 -04:00
Michael McCandless 51773f2a66 fix test to expect AssertionError as well 2015-09-16 04:31:27 -04:00
Robert Muir 01e6d8e3dc Remove java.lang.reflect.ReflectPermission "suppressAccessChecks"
Closes #13603

Squashed commit of the following:

commit 8799fb42d80297a79285beaf407b1bbecdb5854d
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Sep 16 03:32:29 2015 -0400

    Add randomizedtesting snapshot note

commit 0d874d9f0f5fddaeab8f48f9816a052dcaa691be
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Sep 16 03:11:01 2015 -0400

    Add a mechanism for insecure plugins and get all tests passing

commit 80540aeb9a264f6f299aaa3bc89df7f9b7923a60
Author: Robert Muir <rmuir@apache.org>
Date:   Tue Sep 15 22:59:29 2015 -0400

    Really remove, we are killing this

commit 884818c1ad44ca2e7572a6998c086580be919657
Author: Robert Muir <rmuir@apache.org>
Date:   Tue Sep 15 22:57:22 2015 -0400

    fill in TODOs

commit 34f4cb81f249edfec4d8d211da892f8c987e5948
Author: Robert Muir <rmuir@apache.org>
Date:   Tue Sep 15 22:31:43 2015 -0400

    Publish snapshots of RR and lucene and cutover

commit d68eb9d66ce059761805c64d67e41a29098c9afa
Merge: f27e208 f62da59
Author: Robert Muir <rmuir@apache.org>
Date:   Tue Sep 15 12:32:41 2015 -0400

    Merge branch 'master' into kill-setaccessible

commit f27e20855216dab6a6ad035d41018d8c67f3144c
Author: Robert Muir <rmuir@apache.org>
Date:   Tue Sep 15 12:32:21 2015 -0400

    make a real lucene snapshot
2015-09-16 04:08:31 -04:00
Simon Willnauer 76b027a979 [TEST] Only assert on a generic AssertionError
The specific error might be lost on the transport layer and turned into a generic
AssertionError instead.

Closes #13599
2015-09-16 09:21:13 +02:00
Igor Motov 8d542da89d Test: await fix on GroovyScriptIT.testGroovyExceptionSerialization 2015-09-15 22:54:29 -04:00
Igor Motov d6f9fe96af Tests: Make sure that the cluster state came from the same master before checking for discrepancies
If nodes don't agree on the master, the cluster state doesn't have to match even if they have the same version
2015-09-15 19:34:48 -04:00
Simon Willnauer bfa984e1c2 Prevent losing stacktraces when exceptions occur
This commit removes unnecesssary use of ExceptionHelpers where we actually
should serialize / deserialize the actual exception. This commit also
fixes one of the oddest problems where the actual exception was never
rendered / printed if `all shards failed` due to a missing cause.

This commit unfortunately doesn't fix Snapshot/Restore which is almost
unfixable since it has to serialize XContent and read from it which can't
transport exceptions.
2015-09-15 23:20:54 +02:00
xuzha c6da8d5e13 IndexNameExpressionResolver should not ignore any wildcards that occur
elsewhere in the expression,

closes #13334
2015-09-15 10:54:33 -07:00
Nicholas Knize 589fb9674f Relax geopoint comparison tolerance
Weighted centroid, morton hash, and geohash can be imprecise (computation error) to 1e-5. The previous compareTo set this tolerance too strict (1e-6) causing a reproducible comparison error on weighted centroid (#13558). This change relaxes the tolerance to the acceptable computation error of 1e-5

closes #13558
2015-09-15 12:35:10 -05:00
Michael McCandless 2cc873b2d6 Merge branch 'master' into remove_index_buffer_size
Conflicts:
	core/src/main/java/org/elasticsearch/index/engine/EngineConfig.java
2015-09-15 11:34:49 -04:00
Jason Tedor 3d4fac6256 Remove unused import in o.e.t.UpdateThreadPoolSettingsTests 2015-09-15 10:48:01 -04:00