How to change future timeout with play framework 2.1.0

纵然是瞬间 提交于 2019-12-05 12:11:27

It looks like its been fixed in 2.3 but they are not going to back port to any of the 2.2 builds

    javaOptions in Test += "-Dtest.timeout=10000"

Since I am using 2.2 this does not work for me but I hope it works for those on 2.3

If you are writing unit tests this is how you would do it.

@Test
public void testInServer() {
    running(testServer(3333), new Runnable() {
        public void run() {
            assertThat(
                WS.url("http://localhost:3333").get().get(timeout).getStatus()
            ).isEqualTo(OK);
        }
    });
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!