Add some debug logs to testPendingUpdateTask
It times out rarely. Hopefully these will help.
This commit is contained in:
parent
d313cdd7d0
commit
0305628c6b
|
@ -27,11 +27,14 @@ import org.elasticsearch.cluster.ClusterState;
|
||||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
|
import org.elasticsearch.cluster.service.PendingClusterTask;
|
||||||
import org.elasticsearch.common.inject.Inject;
|
import org.elasticsearch.common.inject.Inject;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.threadpool.ThreadPool;
|
import org.elasticsearch.threadpool.ThreadPool;
|
||||||
import org.elasticsearch.transport.TransportService;
|
import org.elasticsearch.transport.TransportService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class TransportPendingClusterTasksAction extends TransportMasterNodeReadAction<PendingClusterTasksRequest, PendingClusterTasksResponse> {
|
public class TransportPendingClusterTasksAction extends TransportMasterNodeReadAction<PendingClusterTasksRequest, PendingClusterTasksResponse> {
|
||||||
|
@ -63,6 +66,9 @@ public class TransportPendingClusterTasksAction extends TransportMasterNodeReadA
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void masterOperation(PendingClusterTasksRequest request, ClusterState state, ActionListener<PendingClusterTasksResponse> listener) {
|
protected void masterOperation(PendingClusterTasksRequest request, ClusterState state, ActionListener<PendingClusterTasksResponse> listener) {
|
||||||
listener.onResponse(new PendingClusterTasksResponse(clusterService.pendingTasks()));
|
logger.trace("fetching pending tasks from cluster service");
|
||||||
|
final List<PendingClusterTask> pendingTasks = clusterService.pendingTasks();
|
||||||
|
logger.trace("done fetching pending tasks from cluster service");
|
||||||
|
listener.onResponse(new PendingClusterTasksResponse(pendingTasks));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -504,6 +504,7 @@ public class ClusterServiceIT extends ESIntegTestCase {
|
||||||
assertThat(processedLatch.await(1, TimeUnit.SECONDS), equalTo(true));
|
assertThat(processedLatch.await(1, TimeUnit.SECONDS), equalTo(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestLogging("_root:debug,action.admin.cluster.tasks:trace")
|
||||||
public void testPendingUpdateTask() throws Exception {
|
public void testPendingUpdateTask() throws Exception {
|
||||||
Settings settings = settingsBuilder()
|
Settings settings = settingsBuilder()
|
||||||
.put("discovery.type", "local")
|
.put("discovery.type", "local")
|
||||||
|
|
Loading…
Reference in New Issue