Skip to content

Integration test failing due to assertion that does not allow calling blocking code from networking threads. #10735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dr2014 opened this issue Apr 22, 2015 · 1 comment

Comments

@dr2014
Copy link

dr2014 commented Apr 22, 2015

Sample project is available at: https://github.com/dr2014/ES_IntegrationTest_Issue

Elasticsearch version: 1.5.1

The assertion in Transports [https://github.com/elastic/elasticsearch/blob/master/src/main/java/org/elasticsearch/transport/Transports.java#L57] is failing integration test for HTTP requests.

What is the correct way to make a blocking call from RestHandler?

Stacktrace:
Expected current thread [Thread[elasticsearch[node_s6][http_server_worker][T#1]{New I/O worker #75},5,SampleTest]] to not be a transport thread. Reason:
java.lang.AssertionError: Expected current thread [Thread[elasticsearch[node_s6][http_server_worker][T#1]{New I/O worker #75},5,TGRP-SampleTest]] to not be a transport thread. Reason:
at org.elasticsearch.transport.Transports.assertNotTransportThread(Transports.java:57)
at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:117)
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:45)
at plugin.TestRestHandler.handleRequest(TestRestHandler.java:37)
at org.elasticsearch.rest.RestController.executeHandler(RestController.java:225)
at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:170)
at org.elasticsearch.http.HttpServer.internalDispatchRequest(HttpServer.java:121)
at org.elasticsearch.http.HttpServer$Dispatcher.dispatchRequest(HttpServer.java:83)
at org.elasticsearch.http.netty.NettyHttpServerTransport.dispatchRequest(NettyHttpServerTransport.java:329)

@s1monw
Copy link
Contributor

s1monw commented Apr 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants