summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/plugins
diff options
context:
space:
mode:
authorSimon Willnauer <simonw@apache.org>2015-12-23 14:46:54 +0100
committerSimon Willnauer <simonw@apache.org>2016-01-13 11:53:32 +0100
commit574d1b35b35e2eb511cd42ab32d3d945b9852e47 (patch)
tree4883c65a88a4fad8ba4c20d7992c7f42bacbe188 /core/src/test/java/org/elasticsearch/plugins
parenta2796b555f5c174f78303a2ce0c5a6439259f84b (diff)
Replace ContextAndHeaders with a ThreadPool based ThreadLocal implementation
ContextAndHeaders has a massive impact on the core infrastructure since it has to be manually passed on to all relevant places across threads/network calls etc. For the same reason it's also very error prone and easily forgotten on potentially relevant APIs. The new ThreadContext is associated with a ThreadPool (node or transport client) and ensures that headers and context registered on a current thread are inherited to new threads spawned, send across the network to be deserialized on the receiver end as well as restored on the response handling thread once the response is received.
Diffstat (limited to 'core/src/test/java/org/elasticsearch/plugins')
-rw-r--r--core/src/test/java/org/elasticsearch/plugins/responseheader/TestResponseHeaderRestAction.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/test/java/org/elasticsearch/plugins/responseheader/TestResponseHeaderRestAction.java b/core/src/test/java/org/elasticsearch/plugins/responseheader/TestResponseHeaderRestAction.java
index 4b1645a4ec..39432bd01e 100644
--- a/core/src/test/java/org/elasticsearch/plugins/responseheader/TestResponseHeaderRestAction.java
+++ b/core/src/test/java/org/elasticsearch/plugins/responseheader/TestResponseHeaderRestAction.java
@@ -33,7 +33,7 @@ public class TestResponseHeaderRestAction extends BaseRestHandler {
@Inject
public TestResponseHeaderRestAction(Settings settings, RestController controller, Client client) {
- super(settings, controller, client);
+ super(settings, client);
controller.registerHandler(RestRequest.Method.GET, "/_protected", this);
}