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
SOLR-13880: Add test that creates/reloads/deletes collections #1105
Conversation
tlogReplicas, | ||
pullReplicas); | ||
HttpGet createCollectionGet = new HttpGet(url); | ||
((CloudLegacySolrClient) cluster.getSolrClient()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this to be CloudLegacySolrClient
?
import org.apache.solr.SolrTestCaseJ4.SuppressSSL; | ||
import org.apache.solr.client.solrj.SolrServerException; | ||
import org.apache.solr.client.solrj.impl.CloudLegacySolrClient; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use non legacy client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turns out we use this to get a HttpClient
in order to do a direct GET..
private void createCollection( | ||
int numShards, int nrtReplicas, int tlogReplicas, int pullReplicas, String collectionName) | ||
throws SolrServerException, IOException { | ||
switch (random().nextInt(3)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird these create strings - don't we have admin API wrappers around these? We shouldn't need to build straight httpget/httppost commands...
@risdenk there are a MILLION places where we create raw HttpGet in the tests, I saw that when I tried to migrate things to As far at not using an API, well, there are two examples, one using the SolrJ, the other with the long string.... |
yea more of a we can skip it now but probably has to be fixed at some point :) |
@risdenk what are your thoughts on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@epugh no reason to block this from merging due to the cloud client. The only thing I would do is beast
this new test a few times (~10) to make sure it doesn't fail out of the gate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I didn't merge this back when I created the PR is that it didn't find any bugs (ran successfully all the time on my machine), so I was debating myself if the coverage added was worth the potential noise of unrelated failures (that we see all the time in Jenkins).
I'm fine with the PR if you guys think it's worth it.
@@ -86,4 +96,107 @@ public void testReloadedLeaderStateAfterZkSessionLoss() throws Exception { | |||
|
|||
log.info("testReloadedLeaderStateAfterZkSessionLoss succeeded ... shutting down now!"); | |||
} | |||
|
|||
@Repeat(iterations = 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it worth having this set to 5? how long does this take? should we have maybe 2 here, and set it higher in nightly? not sure if that's possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two works for me... Makign the change.
https://issues.apache.org/jira/browse/SOLR-13880
Description
Migrate test from apache/lucene-solr#986 to current repo.
Solution
Additional testing.