parent
240a773b07
commit
aecfdc1dd8
|
|
@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.data.elasticsearch;
|
|||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
|
@ -45,11 +46,17 @@ public class ElasticsearchAutoConfigurationTests {
|
|||
|
||||
private AnnotationConfigApplicationContext context;
|
||||
|
||||
@Before
|
||||
public void preventElasticsearchFromConfiguringNetty() {
|
||||
System.setProperty("es.set.netty.runtime.available.processors", "false");
|
||||
}
|
||||
|
||||
@After
|
||||
public void close() {
|
||||
if (this.context != null) {
|
||||
this.context.close();
|
||||
}
|
||||
System.clearProperty("es.set.netty.runtime.available.processors");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import org.elasticsearch.client.node.NodeClient;
|
|||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
|
@ -64,6 +65,11 @@ import static org.mockito.Mockito.mock;
|
|||
*/
|
||||
public class JestAutoConfigurationTests {
|
||||
|
||||
@Before
|
||||
public void preventElasticsearchFromConfiguringNetty() {
|
||||
System.setProperty("es.set.netty.runtime.available.processors", "false");
|
||||
}
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
|
|
@ -74,6 +80,7 @@ public class JestAutoConfigurationTests {
|
|||
if (this.context != null) {
|
||||
this.context.close();
|
||||
}
|
||||
System.clearProperty("es.set.netty.runtime.available.processors");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
<embedded-mongo.version>2.0.0</embedded-mongo.version>
|
||||
<flyway.version>4.2.0</flyway.version>
|
||||
<freemarker.version>2.3.26-incubating</freemarker.version>
|
||||
<elasticsearch.version>5.4.0</elasticsearch.version>
|
||||
<elasticsearch.version>5.4.1</elasticsearch.version>
|
||||
<glassfish-el.version>3.0.0</glassfish-el.version>
|
||||
<groovy.version>2.4.11</groovy.version>
|
||||
<gson.version>2.8.1</gson.version>
|
||||
|
|
|
|||
Loading…
Reference in New Issue