dongxuwang commented on code in PR #575:
URL: https://github.com/apache/incubator-pekko/pull/575#discussion_r1295562508


##########
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:
   Makes sense. Actually I felt like adding one more common case "hallo welt". 



-- 
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]

Reply via email to