Java time duration support for javadsl #24646

java.time.Duration support in all jdocs java file, the persistence module and the distributed-data
This commit is contained in:
Guy Youansi 2018-06-26 15:41:30 +02:00 committed by Johan Andrén
parent ced08fcb57
commit a4951e0ce7
30 changed files with 214 additions and 141 deletions

View file

@ -66,7 +66,7 @@ public class FlowTest extends StreamTest {
final java.lang.Iterable<Integer> input = Arrays.asList(0, 1, 2, 3, 4, 5);
final Source<Integer, NotUsed> ints = Source.from(input);
final Flow<Integer, String, NotUsed> flow1 = Flow.of(Integer.class).drop(2).take(3
).takeWithin(java.time.Duration.ofSeconds(10
).takeWithin(Duration.ofSeconds(10
)).map(new Function<Integer, String>() {
public String apply(Integer elem) {
return lookup[elem];
@ -81,7 +81,7 @@ public class FlowTest extends StreamTest {
public java.util.List<String> apply(java.util.List<String> elem) {
return elem;
}
}).groupedWithin(100, java.time.Duration.ofMillis(50)
}).groupedWithin(100, Duration.ofMillis(50)
).mapConcat(new Function<java.util.List<String>, java.lang.Iterable<String>>() {
public java.util.List<String> apply(java.util.List<String> elem) {
return elem;
@ -189,10 +189,7 @@ public class FlowTest extends StreamTest {
probe.expectMsgEquals(0);
probe.expectMsgEquals(1);
Duration duration = Duration.ofMillis(200);
probe.expectNoMessage(duration);
probe.expectNoMessage(Duration.ofMillis(200));
future.toCompletableFuture().get(3, TimeUnit.SECONDS);
}