You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by GitBox <gi...@apache.org> on 2022/12/03 04:45:40 UTC

[GitHub] [incubator-pekko] jxnu-liguobin commented on a diff in pull request #67: Rename classes containing Akka to Pekko

jxnu-liguobin commented on code in PR #67:
URL: https://github.com/apache/incubator-pekko/pull/67#discussion_r1038709676


##########
akka-actor-tests/src/test/scala/org/apache/pekko/PekkoVersionSpec.scala:
##########
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
+ */
+
+package org.apache.pekko
+
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
+class PekkoVersionSpec extends AnyWordSpec with Matchers {
+
+  "The Pekko version check" must {
+
+    "succeed if version is ok" in {
+      PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.5.6")
+      PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.5.7")
+      PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.6.0")
+    }
+
+    "succeed if version is RC and ok" in {
+      PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.5.7-RC10")
+      PekkoVersion.require("PekkoVersionSpec", "2.6.0-RC1", "2.6.0-RC1")
+    }
+
+    "fail if version is RC and not ok" in {
+      intercept[UnsupportedPekkoVersion] {
+        PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.5.6-RC1")
+      }
+    }
+
+    "succeed if version is milestone and ok" in {
+      PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.5.7-M10")
+    }
+
+    "fail if version is milestone and not ok" in {
+      intercept[UnsupportedPekkoVersion] {
+        PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.5.6-M1")
+      }
+    }
+
+    "fail if major version is different" in {
+      // because not bincomp
+      intercept[UnsupportedPekkoVersion] {
+        PekkoVersion.require("PekkoVersionSpec", "2.5.6", "3.0.0")
+      }
+      intercept[UnsupportedPekkoVersion] {
+        PekkoVersion.require("PekkoVersionSpec", "2.5.6", "1.0.0")
+      }
+    }
+
+    "fail if minor version is too low" in {
+      intercept[UnsupportedPekkoVersion] {
+        PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.4.19")
+      }
+    }
+
+    "fail if patch version is too low" in {
+      intercept[UnsupportedPekkoVersion] {
+        PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.5.5")
+      }
+    }
+
+    "succeed if current Akka version is SNAPSHOT" in {
+      PekkoVersion.require("PekkoVersionSpec", "2.5.6", "2.5-SNAPSHOT")
+    }
+
+    "succeed if current Akka version is timestamped SNAPSHOT" in {

Review Comment:
   Pekko version?



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org