Tests: make sure to load timezones in parent classloader

When GroovySecurityTests are run before any other test using
time zones, joda ZoneInfoProvider fails to load the time zones
correctly and never tries again later. This makes sure we load it
correctly on startup.

Relates to #14524
This commit is contained in:
Christoph Büscher 2015-11-06 10:56:13 +01:00
parent 1c31845b7a
commit 40f82de4a1
1 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,12 @@ public class GroovySecurityTests extends ESTestCase {
private GroovyScriptEngineService se;
static {
// ensure we load all the timezones in the parent classloader with all permissions
// relates to https://github.com/elastic/elasticsearch/issues/14524
org.joda.time.DateTimeZone.getDefault();
}
@Override
public void setUp() throws Exception {
super.setUp();