dongxuwang commented on code in PR #575:
URL: https://github.com/apache/incubator-pekko/pull/575#discussion_r1295591392
##########
actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemSpec.scala:
##########
@@ -125,23 +123,17 @@ object ActorSystemSpec {
}
@nowarn
-class ActorSystemSpec extends PekkoSpec(ActorSystemSpec.config) with
ImplicitSender {
+class ActorSystemSpec extends PekkoSpec(ActorSystemSpec.config) with
ImplicitSender with ScalaCheckPropertyChecks {
import ActorSystemSpec.FastActor
"An ActorSystem" must {
"reject invalid names" in {
- for (n <- Seq(
- "-hallowelt",
- "_hallowelt",
- "hallo*welt",
- "hallo@welt",
- "hallo#welt",
- "hallo$welt",
- "hallo%welt",
- "hallo/welt")) intercept[IllegalArgumentException] {
- ActorSystem(n)
+ forAll { (name: String) =>
+ whenever(!name.matches("""^[a-zA-Z0-9][a-zA-Z0-9-_]*$""")) {
+ intercept[IllegalArgumentException](ActorSystem(name))
+ }
Review Comment:
updated, PTAL
--
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]