Skip to content

Commit

Permalink
add Akka path parsing tests (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored Nov 28, 2023
1 parent 2ebec03 commit 8fefca1
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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") }
Expand Down

0 comments on commit 8fefca1

Please sign in to comment.