[test] changed default close timeout
Original commit: elastic/x-pack-elasticsearch@f07cca869f
This commit is contained in:
parent
31c88ae1e5
commit
a74d1329ba
|
@ -8,6 +8,7 @@ package org.elasticsearch.license;
|
||||||
import org.elasticsearch.ElasticsearchSecurityException;
|
import org.elasticsearch.ElasticsearchSecurityException;
|
||||||
import org.elasticsearch.action.support.PlainListenableActionFuture;
|
import org.elasticsearch.action.support.PlainListenableActionFuture;
|
||||||
import org.elasticsearch.client.transport.TransportClient;
|
import org.elasticsearch.client.transport.TransportClient;
|
||||||
|
import org.elasticsearch.common.unit.TimeValue;
|
||||||
import org.elasticsearch.license.License.OperationMode;
|
import org.elasticsearch.license.License.OperationMode;
|
||||||
import org.elasticsearch.rest.RestStatus;
|
import org.elasticsearch.rest.RestStatus;
|
||||||
import org.elasticsearch.transport.Transport;
|
import org.elasticsearch.transport.Transport;
|
||||||
|
@ -279,7 +280,9 @@ public class MachineLearningLicensingTests extends BaseMlIntegTestCase {
|
||||||
try (TransportClient client = new TestXPackTransportClient(internalCluster().transportClient().settings())) {
|
try (TransportClient client = new TestXPackTransportClient(internalCluster().transportClient().settings())) {
|
||||||
client.addTransportAddress(internalCluster().getDataNodeInstance(Transport.class).boundAddress().publishAddress());
|
client.addTransportAddress(internalCluster().getDataNodeInstance(Transport.class).boundAddress().publishAddress());
|
||||||
PlainListenableActionFuture<CloseJobAction.Response> listener = new PlainListenableActionFuture<>(client.threadPool());
|
PlainListenableActionFuture<CloseJobAction.Response> 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();
|
listener.actionGet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue