* Add java.time.Duration support in the JavaDSL in akka-actor module #24646 * add deprecation and change retry
This commit is contained in:
parent
e18382bb0f
commit
6a9fa1946d
35 changed files with 419 additions and 80 deletions
|
|
@ -4,14 +4,13 @@
|
|||
|
||||
package akka.actor;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.time.Duration;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
import akka.testkit.AkkaJUnitActorSystemResource;
|
||||
import akka.testkit.AkkaSpec;
|
||||
import org.scalatest.junit.JUnitSuite;
|
||||
import scala.concurrent.duration.FiniteDuration;
|
||||
|
||||
public class InboxJavaAPITest extends JUnitSuite {
|
||||
|
||||
|
|
@ -24,7 +23,7 @@ public class InboxJavaAPITest extends JUnitSuite {
|
|||
@Test(expected = TimeoutException.class)
|
||||
public void mustBeAbleToThrowTimeoutException() throws TimeoutException {
|
||||
Inbox inbox = Inbox.create(system);
|
||||
inbox.receive(new FiniteDuration(10, TimeUnit.MILLISECONDS));
|
||||
inbox.receive(Duration.ofMillis(10));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue