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 2021/02/27 02:07:39 UTC
[lucene-solr] branch reference_impl_dev updated: @1411 Test tweaks.
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 8f73a03 @1411 Test tweaks.
8f73a03 is described below
commit 8f73a03f1790da2730c88b518f96d7b7d5ac622d
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Fri Feb 26 20:07:11 2021 -0600
@1411 Test tweaks.
Took 10 minutes
---
solr/core/src/java/org/apache/solr/core/CoreContainer.java | 4 +++-
solr/core/src/java/org/apache/solr/search/join/ScoreModeParser.java | 2 +-
solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java | 4 ++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index 298b21c..b4078f1 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -968,6 +968,8 @@ public class CoreContainer implements Closeable {
solrCores.markCoreAsNotLoading(cd);
}
+ } catch (AlreadyClosedException e){
+ log.warn("Will not finish creating and registering core={} because we are shutting down", cd.getName(), e);
} catch (Exception e){
log.error("Error creating and register core {}", cd.getName(), e);
throw e;
@@ -1257,7 +1259,7 @@ public class CoreContainer implements Closeable {
}
if (isShutDown()) {
- throw new AlreadyClosedException("Already closed");
+ throw new AlreadyClosedException("Will not register SolrCore with ZooKeeper, already closed");
}
// if (isShutDown) {
diff --git a/solr/core/src/java/org/apache/solr/search/join/ScoreModeParser.java b/solr/core/src/java/org/apache/solr/search/join/ScoreModeParser.java
index a303046..914dcdf 100644
--- a/solr/core/src/java/org/apache/solr/search/join/ScoreModeParser.java
+++ b/solr/core/src/java/org/apache/solr/search/join/ScoreModeParser.java
@@ -44,7 +44,7 @@ class ScoreModeParser {
* @throws SyntaxError when it's unable to parse
* */
static ScoreMode parse(String score) throws SyntaxError {
- final ScoreMode scoreMode = lowerAndCapitalCase.get(score);
+ final ScoreMode scoreMode = lowerAndCapitalCase.get(score.toLowerCase(Locale.ROOT));
if (scoreMode == null) {
throw new SyntaxError("Unable to parse ScoreMode from: " + score);
}
diff --git a/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java b/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
index aba3a6d..3e968ae 100644
--- a/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
+++ b/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
@@ -198,8 +198,8 @@ public class BJQParserTest extends SolrTestCaseJ4 {
public void testWrongScoreExceptionForParent() throws Exception {
final String aMode = ScoreMode.values()[random().nextInt(ScoreMode.values().length)].name();
- final String wrongMode = LuceneTestCase.rarely()? "":(LuceneTestCase.rarely()? " ":
- LuceneTestCase.rarely()? aMode.substring(1):aMode.toUpperCase(Locale.ROOT));
+ final String wrongMode = LuceneTestCase.rarely()? "":(LuceneTestCase.rarely()? "":
+ LuceneTestCase.rarely()? aMode.substring(1):aMode.toUpperCase(Locale.ROOT) + "k");
assertQEx("wrong score mode",
req("q", "{!parent which=\"parent_s:[* TO *]\" score="+wrongMode+"}child_s:l","fl","score")
, SolrException.ErrorCode.BAD_REQUEST.code);