From a74d1329ba9066dfd83d1cba9bbd07f2c6fdfdd0 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Sat, 18 Feb 2017 15:40:03 +0100 Subject: [PATCH] [test] changed default close timeout Original commit: elastic/x-pack-elasticsearch@f07cca869fde68381e244d7eb7f4450b94e2f25f --- .../elasticsearch/license/MachineLearningLicensingTests.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/src/test/java/org/elasticsearch/license/MachineLearningLicensingTests.java b/plugin/src/test/java/org/elasticsearch/license/MachineLearningLicensingTests.java index c288fe198ee..5fe56b1b1c2 100644 --- a/plugin/src/test/java/org/elasticsearch/license/MachineLearningLicensingTests.java +++ b/plugin/src/test/java/org/elasticsearch/license/MachineLearningLicensingTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.license; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.action.support.PlainListenableActionFuture; import org.elasticsearch.client.transport.TransportClient; +import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.license.License.OperationMode; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.transport.Transport; @@ -279,7 +280,9 @@ public class MachineLearningLicensingTests extends BaseMlIntegTestCase { try (TransportClient client = new TestXPackTransportClient(internalCluster().transportClient().settings())) { client.addTransportAddress(internalCluster().getDataNodeInstance(Transport.class).boundAddress().publishAddress()); PlainListenableActionFuture listener = new PlainListenableActionFuture<>(client.threadPool()); - new MachineLearningClient(client).closeJob(new CloseJobAction.Request("foo"), listener); + CloseJobAction.Request request = new CloseJobAction.Request("foo"); + request.setTimeout(TimeValue.timeValueSeconds(30)); + new MachineLearningClient(client).closeJob(request, listener); listener.actionGet(); } }