update to Jackson 2.11, Log4j 2.13.3, fix node client tests
This commit is contained in:
parent
0a326977c7
commit
2c117be26e
9 changed files with 22 additions and 5 deletions
|
@ -53,6 +53,7 @@ public class NodeClientHelper {
|
|||
.put("node.client", true)
|
||||
.put("node.master", false)
|
||||
.put("node.data", false)
|
||||
.put("path.home", settings.get("path.home"))
|
||||
.build();
|
||||
logger.info("creating node client on {} with effective settings {}",
|
||||
version, effectiveSettings.getAsMap());
|
||||
|
|
|
@ -43,6 +43,7 @@ class BulkClientTest {
|
|||
void testSingleDoc() throws Exception {
|
||||
final NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.put(Parameters.MAX_ACTIONS_PER_REQUEST.name(), MAX_ACTIONS_PER_REQUEST)
|
||||
.put(Parameters.FLUSH_INTERVAL.name(), TimeValue.timeValueSeconds(30))
|
||||
.build();
|
||||
|
@ -65,6 +66,7 @@ class BulkClientTest {
|
|||
void testNewIndex() throws Exception {
|
||||
final NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.put(Parameters.FLUSH_INTERVAL.name(), TimeValue.timeValueSeconds(5))
|
||||
.build();
|
||||
bulkClient.newIndex("test");
|
||||
|
@ -75,9 +77,11 @@ class BulkClientTest {
|
|||
void testMapping() throws Exception {
|
||||
try (NodeAdminClient adminClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setAdminClientProvider(NodeAdminClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.build();
|
||||
NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.build()) {
|
||||
XContentBuilder builder = JsonXContent.contentBuilder()
|
||||
.startObject()
|
||||
|
@ -99,6 +103,7 @@ class BulkClientTest {
|
|||
long numactions = ACTIONS;
|
||||
final NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.put(Parameters.MAX_ACTIONS_PER_REQUEST.name(), MAX_ACTIONS_PER_REQUEST)
|
||||
.put(Parameters.FLUSH_INTERVAL.name(), TimeValue.timeValueSeconds(60))
|
||||
.build();
|
||||
|
@ -130,6 +135,7 @@ class BulkClientTest {
|
|||
logger.info("maxthreads={} maxactions={} maxloop={}", maxthreads, maxActionsPerRequest, actions);
|
||||
final NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.put(Parameters.MAX_CONCURRENT_REQUESTS.name(), maxthreads)
|
||||
.put(Parameters.MAX_ACTIONS_PER_REQUEST.name(), maxActionsPerRequest)
|
||||
.put(Parameters.FLUSH_INTERVAL.name(), TimeValue.timeValueSeconds(60))
|
||||
|
|
|
@ -35,6 +35,7 @@ class DuplicateIDTest {
|
|||
long numactions = ACTIONS;
|
||||
try (NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.put(Parameters.MAX_ACTIONS_PER_REQUEST.name(), MAX_ACTIONS_PER_REQUEST)
|
||||
.build()) {
|
||||
bulkClient.newIndex("test");
|
||||
|
|
|
@ -35,9 +35,11 @@ class IndexPruneTest {
|
|||
void testPrune() throws IOException {
|
||||
try (NodeAdminClient adminClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setAdminClientProvider(NodeAdminClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.build();
|
||||
NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.build()) {
|
||||
Settings settings = Settings.builder()
|
||||
.put("index.number_of_shards", 1)
|
||||
|
|
|
@ -35,9 +35,11 @@ class IndexShiftTest {
|
|||
void testIndexShift() throws Exception {
|
||||
try (NodeAdminClient adminClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setAdminClientProvider(NodeAdminClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.build();
|
||||
NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.build()) {
|
||||
Settings settings = Settings.builder()
|
||||
.put("index.number_of_shards", 1)
|
||||
|
|
|
@ -39,6 +39,7 @@ class SearchTest {
|
|||
long numactions = ACTIONS;
|
||||
final NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.put(Parameters.MAX_ACTIONS_PER_REQUEST.name(), MAX_ACTIONS_PER_REQUEST)
|
||||
.build();
|
||||
try (bulkClient) {
|
||||
|
@ -59,6 +60,7 @@ class SearchTest {
|
|||
assertNull(bulkClient.getBulkController().getLastBulkError());
|
||||
try (NodeSearchClient searchClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setSearchClientProvider(NodeSearchClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.build()) {
|
||||
Stream<SearchHit> stream = searchClient.search(qb -> qb
|
||||
.setIndices("test")
|
||||
|
|
|
@ -32,9 +32,11 @@ class SmokeTest {
|
|||
void smokeTest() throws Exception {
|
||||
try (NodeAdminClient adminClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setAdminClientProvider(NodeAdminClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.build();
|
||||
NodeBulkClient bulkClient = ClientBuilder.builder(helper.client("1"))
|
||||
.setBulkClientProvider(NodeBulkClientProvider.class)
|
||||
.put(helper.getNodeSettings())
|
||||
.build()) {
|
||||
IndexDefinition indexDefinition =
|
||||
adminClient.buildIndexDefinitionFromSettings("test_smoke", Settings.EMPTY);
|
||||
|
|
|
@ -180,6 +180,7 @@ public class TestExtension implements ParameterResolver, BeforeEachCallback, Aft
|
|||
|
||||
Settings getNodeSettings() {
|
||||
return Settings.builder()
|
||||
.put("name", "elx-client") // for Threadpool name
|
||||
.put("cluster.name", getClusterName())
|
||||
.put("path.home", getHome())
|
||||
.build();
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
group = org.xbib
|
||||
name = elx
|
||||
version = 2.2.1.18
|
||||
version = 2.2.1.19
|
||||
|
||||
gradle.wrapper.version = 6.4.1
|
||||
xbib-metrics.version = 2.1.0
|
||||
xbib-guice.version = 4.4.2
|
||||
xbib-guava.version = 28.1
|
||||
xbib-netty-http.version = 4.1.49.0
|
||||
xbib-netty-http.version = 4.1.49.1
|
||||
elasticsearch.version = 2.2.1
|
||||
jackson.version = 2.9.10
|
||||
# jackson.version = 2.9.10
|
||||
jackson.version = 2.11.0
|
||||
jna.version = 4.5.2
|
||||
log4j.version = 2.13.1
|
||||
log4j.version = 2.13.3
|
||||
mustache.version = 0.9.5
|
||||
jts.version = 1.13
|
||||
junit.version = 5.6.2
|
||||
asciidoclet.version = 1.5.4
|
||||
|
|
Loading…
Reference in a new issue