You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing an integration test which extends ESIntegTestCase and trying to list existing tasks with client().admin().cluster().prepareListTasks().get(), I'm getting:
[2016-08-02 23:41:37,884][WARN ][org.elasticsearch.test.transport] [transport_client_node_sd1] Failed to receive message for action [cluster:monitor/tasks/lists]
java.lang.IllegalStateException: discoveryNodes must be set before calling toXContent with group_by=nodes
at org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse.toXContent(ListTasksResponse.java:159)
at org.elasticsearch.common.Strings.toString(Strings.java:901)
at org.elasticsearch.common.Strings.toString(Strings.java:887)
at org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse.toString(ListTasksResponse.java:208)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertVersionSerializable(ElasticsearchAssertions.java:678)
at org.elasticsearch.test.transport.AssertingLocalTransport.handleParsedResponse(AssertingLocalTransport.java:85)
at org.elasticsearch.transport.local.LocalTransport.handleResponse(LocalTransport.java:386)
at org.elasticsearch.transport.local.LocalTransport.processReceivedMessage(LocalTransport.java:292)
at org.elasticsearch.transport.local.LocalTransport.lambda$receiveMessage$0(LocalTransport.java:252)
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:450)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
The text was updated successfully, but these errors were encountered:
We just overwrite `toString()` method so it calls toXContent
with `group_by` = "whatever" so we don't try to group by nodes
which does not make sense in a toString() method.
We keep the old behavior for `toXContent()` method which
means that there is no impact in the REST layer but
only in logs and tests (where we call `toString()`).
Closeselastic#19772.
When writing an integration test which extends
ESIntegTestCase
and trying to list existing tasks withclient().admin().cluster().prepareListTasks().get()
, I'm getting:The text was updated successfully, but these errors were encountered: