You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/09/04 19:19:43 UTC
[lucene-solr] branch reference_impl_dev updated: @743 We don't have
single threaded option in http2 version.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/reference_impl_dev by this push:
new 6f0dce5 @743 We don't have single threaded option in http2 version.
6f0dce5 is described below
commit 6f0dce5f1b98dd8dd667cc5928855bf8effeeed1
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Fri Sep 4 14:19:07 2020 -0500
@743 We don't have single threaded option in http2 version.
---
.../solrj/impl/CloudHttp2SolrClientTest.java | 38 +++-------------------
1 file changed, 5 insertions(+), 33 deletions(-)
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
index 69382b8..2e18e87 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
@@ -258,33 +258,6 @@ public class CloudHttp2SolrClientTest extends SolrCloudTestCase {
.add(id, "2", "a_t", "hello2")
.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
- // Test single threaded routed updates for UpdateRequest
- NamedList<Object> response = getRandomClient().request(request, "routing_collection");
- if (getRandomClient().isDirectUpdatesToLeadersOnly()) {
- checkSingleServer(response);
- }
- RouteResponse rr = (RouteResponse) response;
- Map<String,LBSolrClient.Req> routes = rr.getRoutes();
- Iterator<Map.Entry<String,LBSolrClient.Req>> it = routes.entrySet()
- .iterator();
- while (it.hasNext()) {
- Map.Entry<String,LBSolrClient.Req> entry = it.next();
- String url = entry.getKey();
- UpdateRequest updateRequest = (UpdateRequest) entry.getValue()
- .getRequest();
- SolrInputDocument doc = updateRequest.getDocuments().get(0);
- String id = doc.getField("id").getValue().toString();
- ModifiableSolrParams params = new ModifiableSolrParams();
- params.add("q", "id:" + id);
- params.add("distrib", "false");
- QueryRequest queryRequest = new QueryRequest(params);
- try (Http2SolrClient solrClient = SolrTestCaseJ4.getHttpSolrClient(url)) {
- QueryResponse queryResponse = queryRequest.process(solrClient);
- SolrDocumentList docList = queryResponse.getResults();
- assertTrue(docList.getNumFound() == 1);
- }
- }
-
// Test the deleteById routing for UpdateRequest
final UpdateResponse uResponse = new UpdateRequest()
@@ -305,16 +278,15 @@ public class CloudHttp2SolrClientTest extends SolrCloudTestCase {
.withParallelUpdates(true)
.build()) {
threadedClient.setDefaultCollection("routing_collection");
- response = threadedClient.request(request);
+ NamedList<Object> response = threadedClient.request(request);
if (threadedClient.isDirectUpdatesToLeadersOnly()) {
checkSingleServer(response);
}
- rr = (RouteResponse) response;
- routes = rr.getRoutes();
- it = routes.entrySet()
- .iterator();
+ RouteResponse rr = (RouteResponse) response;
+ Map routes = rr.getRoutes();
+ Iterator it = routes.entrySet().iterator();
while (it.hasNext()) {
- Map.Entry<String,LBSolrClient.Req> entry = it.next();
+ Map.Entry<String,LBSolrClient.Req> entry = (Map.Entry<String,LBSolrClient.Req>) it.next();
String url = entry.getKey();
UpdateRequest updateRequest = (UpdateRequest) entry.getValue()
.getRequest();