janhoy commented on code in PR #5254:
URL: https://github.com/apache/solr/pull/5254#discussion_r4399363201
##########
solr/api/src/test/org/apache/solr/util/TestSolrVersion.java:
##########
@@ -59,4 +59,18 @@ public void testSatisfies() {
assertFalse(SOLR_9_0_1.satisfies("8.x"));
assertTrue(SOLR_9_0_1.satisfies("8 - 9"));
}
+
+ public void testPrereleaseIgnoredBySatisfies() {
+ SolrVersion snapshot = SolrVersion.valueOf("10.1.0-SNAPSHOT");
+ assertTrue(snapshot.satisfies(">=9.0.0"));
+ assertTrue(snapshot.satisfies("10.x"));
+ assertTrue(snapshot.satisfies("~10.1"));
+ assertFalse(snapshot.satisfies("<10.1"));
Review Comment:
Technically, any prerelease `-SNAPSHOT`, `-beta`, `-alpha2` is a LOWER
version than the GA version. Why do we need this class to pretend they are the
same?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]