0
votes

I am trying to debug unit tests in play and I am running into timeouts every time.

Error: Futures timed out after [10000] milliseconds

I was wondering how I can manually increase the timeout in Play 2.2.6 with Java?

Also, I cannot update to 2.3 at the moment.

1
I'd probably look into why it's taking more than 10 seconds.Lachlan Goodhew-Cook
@Lachian I guess it's because he is debugging..Francesco Ditrani

1 Answers

0
votes

In your test class, put this initialization block, which sets the time out to 5 minutes:

public Test {

    public static final long DEFAULT_TIMEOUT = 5 * 60000L;

    static {
        System.setProperty("test.timeout", Long.toString(DEFAULT_TIMEOUT));
    }
}