You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2023/11/28 09:51:30 UTC
(incubator-pekko) branch main updated: add Akka path parsing tests (#819)
This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 8fefca1c81 add Akka path parsing tests (#819)
8fefca1c81 is described below
commit 8fefca1c81e13d089ed8db85f375eb3538089c43
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Tue Nov 28 10:51:24 2023 +0100
add Akka path parsing tests (#819)
---
.../test/scala/org/apache/pekko/actor/ActorPathSpec.scala | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorPathSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorPathSpec.scala
index 6feec3e307..a7573979fb 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorPathSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorPathSpec.scala
@@ -32,6 +32,21 @@ class ActorPathSpec extends AnyWordSpec with Matchers {
ActorPath.fromString(remote).toString should ===(remote)
}
+ "support parsing remote akka paths" in {
+ val remote = "akka://my_sys@host:1234/some/ref"
+ ActorPath.fromString(remote).toString should ===(remote)
+ }
+
+ "support parsing AddressFromURIString" in {
+ val remote = "pekko://my_sys@host:1234"
+ AddressFromURIString(remote) should ===(Address("pekko", "my_sys", Some("host"), Some(1234)))
+ }
+
+ "support parsing akka AddressFromURIString" in {
+ val remote = "akka://my_sys@host:1234"
+ AddressFromURIString(remote) should ===(Address("akka", "my_sys", Some("host"), Some(1234)))
+ }
+
"throw exception upon malformed paths" in {
intercept[MalformedURLException] { ActorPath.fromString("") }
intercept[MalformedURLException] { ActorPath.fromString("://hallo") }
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org