He-Pin commented on code in PR #1030:
URL: https://github.com/apache/incubator-pekko/pull/1030#discussion_r1463351485
##########
actor-tests/src/test/java/org/apache/pekko/dispatch/JavaFutureTests.java:
##########
@@ -40,25 +40,31 @@ public class JavaFutureTests extends JUnitSuite {
@ClassRule
public static PekkoJUnitActorSystemResource actorSystemResource =
- new PekkoJUnitActorSystemResource("JavaFutureTests", PekkoSpec.testConf());
+ new PekkoJUnitActorSystemResource("JavaFutureTests",
PekkoSpec.testConf());
private final ActorSystem system = actorSystemResource.getSystem();
private final Duration timeout = Duration.create(5, TimeUnit.SECONDS);
@Test
public void mustBeAbleToMapAFuture() throws Exception {
- Future<String> f1 = Futures.future(new Callable<String>() {
- public String call() {
- return "Hello";
- }
- }, system.dispatcher());
-
- Future<String> f2 = f1.map(new Mapper<String, String>() {
- public String apply(String s) {
- return s + " World";
- }
- }, system.dispatcher());
+ Future<String> f1 =
+ Futures.future(
+ new Callable<String>() {
+ public String call() {
+ return "Hello";
+ }
+ },
+ system.dispatcher());
Review Comment:
I will merge, this thanks everyone.
--
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]