You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2015/02/26 20:54:28 UTC

svn commit: r1662555 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/solrj/ solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java

Author: noble
Date: Thu Feb 26 19:54:27 2015
New Revision: 1662555

URL: http://svn.apache.org/r1662555
Log:
SOLR-7130: remove the special entry from response after reading, so that tests don't see them

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/solrj/   (props changed)
    lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java?rev=1662555&r1=1662554&r2=1662555&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java (original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java Thu Feb 26 19:54:27 2015
@@ -807,8 +807,11 @@ public class CloudSolrClient extends Sol
     NamedList<Object> resp = null;
     try {
       resp = sendRequest(request);
+      //to avoid an O(n) operation we always add STATE_VERSION to the last and try to read it from there
       Object o = resp.get(STATE_VERSION, resp.size()-1);
       if(o != null && o instanceof Map) {
+        //remove this because no one else needs this and tests would fail if they are comparing responses
+        resp.remove(resp.size()-1);
         Map invalidStates = (Map) o;
         for (Object invalidEntries : invalidStates.entrySet()) {
           Map.Entry e = (Map.Entry) invalidEntries;