You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by kr...@apache.org on 2022/10/24 16:27:19 UTC

[solr] branch main updated: SOLR-16467: Upgrade semver4j to 2.2.0 to fix failures with some locales (#1117)

This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 8dec9cf416a SOLR-16467: Upgrade semver4j to 2.2.0 to fix failures with some locales (#1117)
8dec9cf416a is described below

commit 8dec9cf416ab37e73076337a5a2bfa7e9c5d7aff
Author: Kevin Risden <ri...@users.noreply.github.com>
AuthorDate: Mon Oct 24 12:27:13 2022 -0400

    SOLR-16467: Upgrade semver4j to 2.2.0 to fix failures with some locales (#1117)
---
 solr/CHANGES.txt                                         |  2 ++
 .../org/apache/solr/cloud/PackageManagerCLITest.java     | 13 -------------
 .../src/test/org/apache/solr/util/TestSolrVersion.java   | 16 ----------------
 solr/licenses/semver4j-2.1.1.jar.sha1                    |  1 -
 solr/licenses/semver4j-2.2.0.jar.sha1                    |  1 +
 versions.lock                                            |  2 +-
 versions.props                                           |  2 +-
 7 files changed, 5 insertions(+), 32 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 7ab742631bf..d696b618f43 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -89,6 +89,8 @@ Other Changes
 
 * SOLR-16443: Upgrade Jackson bom to 2.13.4.20221013 (Kevin Risden)
 
+* SOLR-16467: Upgrade semver4j to 2.2.0 to fix failures with some locales (Kevin Risden)
+
 ==================  9.1.0 ==================
 
 New Features
diff --git a/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java b/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java
index 665712bf28f..0980f31b5e2 100644
--- a/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java
@@ -19,14 +19,11 @@ package org.apache.solr.cloud;
 
 import java.lang.invoke.MethodHandles;
 import java.util.Arrays;
-import java.util.Locale;
-import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.core.TestSolrConfigHandler;
 import org.apache.solr.util.LogLevel;
 import org.apache.solr.util.PackageTool;
 import org.apache.solr.util.SolrCLI;
-import org.apache.solr.util.SolrVersion;
 import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.ServerConnector;
@@ -54,18 +51,8 @@ public class PackageManagerCLITest extends SolrCloudTestCase {
 
   private static LocalWebServer repositoryServer;
 
-  @SuppressWarnings("AssertionFailureIgnored")
   @BeforeClass
   public static void setupCluster() throws Exception {
-    // Checks that semver4j works with configured locale */
-    try {
-      assertTrue(SolrVersion.valueOf("9.0.1").satisfies("~9.0"));
-    } catch (AssertionError e) {
-      SolrTestCaseJ4.assumeNoException(
-          "See SOLR-16467 - semver4j doesn't work with " + Locale.getDefault().toLanguageTag(),
-          new Exception(e));
-    }
-
     System.setProperty("enable.packages", "true");
 
     configureCluster(1)
diff --git a/solr/core/src/test/org/apache/solr/util/TestSolrVersion.java b/solr/core/src/test/org/apache/solr/util/TestSolrVersion.java
index 93822e83846..1a43e7cab71 100644
--- a/solr/core/src/test/org/apache/solr/util/TestSolrVersion.java
+++ b/solr/core/src/test/org/apache/solr/util/TestSolrVersion.java
@@ -16,28 +16,12 @@
  */
 package org.apache.solr.util;
 
-import java.util.Locale;
 import org.apache.solr.SolrTestCase;
-import org.apache.solr.SolrTestCaseJ4;
-import org.junit.BeforeClass;
 import org.semver4j.SemverException;
 
 public class TestSolrVersion extends SolrTestCase {
   private static final SolrVersion SOLR_9_0_1 = SolrVersion.valueOf("9.0.1");
 
-  @SuppressWarnings("AssertionFailureIgnored")
-  @BeforeClass
-  public static void beforeClass() {
-    // Checks that semver4j works with configured locale */
-    try {
-      assertTrue(SOLR_9_0_1.satisfies("~9.0"));
-    } catch (AssertionError e) {
-      SolrTestCaseJ4.assumeNoException(
-          "See SOLR-16467 - semver4j doesn't work with " + Locale.getDefault().toLanguageTag(),
-          new Exception(e));
-    }
-  }
-
   public void testToString() {
     assertEquals("9.0.0", SolrVersion.forIntegers(9, 0, 0).toString());
   }
diff --git a/solr/licenses/semver4j-2.1.1.jar.sha1 b/solr/licenses/semver4j-2.1.1.jar.sha1
deleted file mode 100644
index 470d47111b4..00000000000
--- a/solr/licenses/semver4j-2.1.1.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-6ebbbbd834460ab2e7b66b119cb21f616f8d2ccc
diff --git a/solr/licenses/semver4j-2.2.0.jar.sha1 b/solr/licenses/semver4j-2.2.0.jar.sha1
new file mode 100644
index 00000000000..5fcf7a326bb
--- /dev/null
+++ b/solr/licenses/semver4j-2.2.0.jar.sha1
@@ -0,0 +1 @@
+e834a5e1c163110a9a32a107e48988c18cf13b94
diff --git a/versions.lock b/versions.lock
index 7741bfc1d26..40dcefaf93f 100644
--- a/versions.lock
+++ b/versions.lock
@@ -295,7 +295,7 @@ org.ow2.asm:asm-commons:7.2 (1 constraints: 6b0f7267)
 org.ow2.asm:asm-tree:7.2 (2 constraints: 2f14468c)
 org.quicktheories:quicktheories:0.26 (1 constraints: dc04f530)
 org.reactivestreams:reactive-streams:1.0.3 (3 constraints: 3c2b02fd)
-org.semver4j:semver4j:2.1.1 (1 constraints: 0605f935)
+org.semver4j:semver4j:2.2.0 (1 constraints: 0605fb35)
 org.slf4j:jcl-over-slf4j:1.7.36 (3 constraints: 05188eb8)
 org.slf4j:jul-to-slf4j:1.7.36 (3 constraints: 5928c263)
 org.slf4j:slf4j-api:1.7.36 (40 constraints: 08f98db1)
diff --git a/versions.props b/versions.props
index 1d038b46e86..2031b048dd8 100644
--- a/versions.props
+++ b/versions.props
@@ -68,7 +68,7 @@ org.mockito:mockito-core=3.8.0
 org.openjdk.jmh:*=1.32
 org.osgi:osgi.annotation=8.1.0
 org.quicktheories:quicktheories=0.26
-org.semver4j:semver4j=2.1.1
+org.semver4j:semver4j=2.2.0
 org.slf4j:*=1.7.36
 org.xerial.snappy:snappy-java=1.1.7.6
 software.amazon.awssdk:*=2.17.63