mirror of https://github.com/apache/lucene.git
SOLR-6755: Adding a check in the test to stop hitting the ClassCast exception.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1687104 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
48ea578733
commit
5164a48fd0
|
@ -122,10 +122,17 @@ public class CloudMLTQParserTest extends AbstractFullDistribZkTestBase {
|
|||
assertArrayEquals(expectedIds, actualIds);
|
||||
|
||||
String expectedQueryString = "lowerfilt:bmw lowerfilt:usa";
|
||||
|
||||
ArrayList<String> actualParsedQueries = (ArrayList<String>) queryResponse
|
||||
.getDebugMap().get("parsedquery");
|
||||
|
||||
ArrayList<String> actualParsedQueries;
|
||||
|
||||
if(queryResponse.getDebugMap().get("parsedquery") instanceof String) {
|
||||
actualParsedQueries = new ArrayList();
|
||||
actualParsedQueries.add((String) queryResponse.getDebugMap().get("parsedquery"));
|
||||
} else {
|
||||
actualParsedQueries = (ArrayList<String>) queryResponse
|
||||
.getDebugMap().get("parsedquery");
|
||||
}
|
||||
|
||||
for (int counter = 0; counter < actualParsedQueries.size(); counter++) {
|
||||
assertTrue("Parsed queries aren't equal",
|
||||
compareParsedQueryStrings(expectedQueryString,
|
||||
|
|
Loading…
Reference in New Issue