You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "Roiocam (via GitHub)" <gi...@apache.org> on 2024/02/27 09:23:42 UTC

[I] AskPattern won't userefPrefix sometime. [incubator-pekko]

Roiocam opened a new issue, #1157:
URL: https://github.com/apache/incubator-pekko/issues/1157

   <!--
   Please report issues regarding specific projects in their respective issue trackers, e.g.:
    - Pekko HTTP: https://github.com/apache/incubator-pekko-http/issues
    - Pekko Connectors: https://github.com/apache/incubator-pekko-connectors/issues 
    - Pekko Persistence Cassandra Plugin: https://github.com/apache/incubator-pekko-persistence-cassandra/issues
    - ...
   
   Please explain your issue precisely, and if possible provide a reproducer snippet (this helps resolve issues much quicker).
   
   Thanks for contributing!
   -->
   We use ActorPath to detect the source of the Actor. 
   In my case, the actor is partly from SourceActor and partly from the temporary Actor produced by AskPattern. We want to ensure that this logic is correct through the unit test.
   
   These unit test look like:
   
   ```diff
   ActorRef<Object> sourceRef = spawn(echoBehavior, "source");
   CompletionStage<Message> ask = AskPattern.ask(
           sourceRef,
           reply -> {
   +           System.out.println(reply.toString());
               return new Message(reply);
           },
           Duration.ofSeconds(1),
           getSystem().scheduler()
   );
   
   Message reply = ask.toCompletableFuture().join();
   Assert.assertTrue(reply.getActorRef().path().toString().contains("source"));
   ```
   
   As the title shows, when`messageFactory` lacks STDOUT code(which the line of diff shows), the unit test fails, and the path of ActorRef is: `pekko://test/temp/$a#0`
   
   But after adding STDOUT into `messageFactory`, things turn to a different way: the unit test passed, and the path of ActorRef is `pekko://test/temp/source$a#0`
   
   
   


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


Re: [I] AskPattern won't userefPrefix sometime. [incubator-pekko]

Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof closed issue #1157: AskPattern won't userefPrefix sometime.
URL: https://github.com/apache/incubator-pekko/issues/1157


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