java - Integration test works with activator but not IntelliJ -
i've got junit test came 1 of sample code projects play framework works , passes when running activator test
command line fails run, timing out, when running test in intellij. i'm new sbt, have work within ide?
here's test:
@test public void test() { running(testserver(3333, fakeapplication(inmemorydatabase())), htmlunit, browser -> { browser.goto("http://localhost:3333"); assertthat(browser.pagesource(), containsstring("add person")); }); }
here's error log when running in intellij:
[[37minfo] - application - creating pool datasource 'default' [[37minfo] - play.api.db.hikaricpconnectionpool - datasource [default] bound jndi defaultds [[37minfo] - application - shutting down connection pool. org.openqa.selenium.timeoutexception: java.net.sockettimeoutexception: read timed out build info: version: '2.44.0', revision: '76d78cf323ce037c5f92db6c1bba601c2ac43ad8', time: '2014-10-23 13:11:40' system info: host: 'vtaisg708384.local', ip: '192.168.99.1', os.name: 'mac os x', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_73' driver info: driver.version: htmlunitdriver @ org.openqa.selenium.htmlunit.htmlunitdriver.get(htmlunitdriver.java:491) @ org.openqa.selenium.htmlunit.htmlunitdriver.get(htmlunitdriver.java:469) @ org.fluentlenium.core.fluent.goto(fluent.java:336) @ integrationtest.lambda$test$0(integrationtest.java:22) @ play.test.helpers.running(helpers.java:549) @ play.test.helpers.running(helpers.java:535) @ integrationtest.test(integrationtest.java:21) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.junit.runners.model.frameworkmethod$1.runreflectivecall(frameworkmethod.java:50) @ org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12) @ org.junit.runners.model.frameworkmethod.invokeexplosively(frameworkmethod.java:47) @ org.junit.internal.runners.statements.invokemethod.evaluate(invokemethod.java:17) @ org.junit.runners.parentrunner.runleaf(parentrunner.java:325) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:78) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:57) @ org.junit.runners.parentrunner$3.run(parentrunner.java:290) @ org.junit.runners.parentrunner$1.schedule(parentrunner.java:71) @ org.junit.runners.parentrunner.runchildren(parentrunner.java:288) @ org.junit.runners.parentrunner.access$000(parentrunner.java:58) @ org.junit.runners.parentrunner$2.evaluate(parentrunner.java:268) @ org.junit.runners.parentrunner.run(parentrunner.java:363) @ org.junit.runner.junitcore.run(junitcore.java:137) @ com.intellij.junit4.junit4ideatestrunner.startrunnerwithargs(junit4ideatestrunner.java:69) @ com.intellij.rt.execution.junit.junitstarter.preparestreamsandstart(junitstarter.java:234) @ com.intellij.rt.execution.junit.junitstarter.main(junitstarter.java:74) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ com.intellij.rt.execution.application.appmain.main(appmain.java:144) caused by: java.net.sockettimeoutexception: read timed out @ java.net.socketinputstream.socketread0(native method) @ java.net.socketinputstream.socketread(socketinputstream.java:116) @ java.net.socketinputstream.read(socketinputstream.java:170) @ java.net.socketinputstream.read(socketinputstream.java:141) @ org.apache.http.impl.io.sessioninputbufferimpl.streamread(sessioninputbufferimpl.java:136) @ org.apache.http.impl.io.sessioninputbufferimpl.fillbuffer(sessioninputbufferimpl.java:152) @ org.apache.http.impl.io.sessioninputbufferimpl.readline(sessioninputbufferimpl.java:270) @ org.apache.http.impl.conn.defaulthttpresponseparser.parsehead(defaulthttpresponseparser.java:140) @ org.apache.http.impl.conn.defaulthttpresponseparser.parsehead(defaulthttpresponseparser.java:57) @ org.apache.http.impl.io.abstractmessageparser.parse(abstractmessageparser.java:260) @ org.apache.http.impl.defaultbhttpclientconnection.receiveresponseheader(defaultbhttpclientconnection.java:161) @ org.apache.http.impl.conn.cpoolproxy.receiveresponseheader(cpoolproxy.java:153) @ org.apache.http.protocol.httprequestexecutor.doreceiveresponse(httprequestexecutor.java:271) @ org.apache.http.protocol.httprequestexecutor.execute(httprequestexecutor.java:123) @ org.apache.http.impl.execchain.mainclientexec.execute(mainclientexec.java:254) @ org.apache.http.impl.execchain.protocolexec.execute(protocolexec.java:195) @ org.apache.http.impl.execchain.retryexec.execute(retryexec.java:86) @ org.apache.http.impl.execchain.redirectexec.execute(redirectexec.java:108) @ org.apache.http.impl.client.internalhttpclient.doexecute(internalhttpclient.java:184) @ org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient.java:72) @ com.gargoylesoftware.htmlunit.httpwebconnection.getresponse(httpwebconnection.java:178) @ com.gargoylesoftware.htmlunit.webclient.loadwebresponsefromwebconnection(webclient.java:1313) @ com.gargoylesoftware.htmlunit.webclient.loadwebresponse(webclient.java:1230) @ com.gargoylesoftware.htmlunit.webclient.getpage(webclient.java:338) @ com.gargoylesoftware.htmlunit.webclient.getpage(webclient.java:407) @ org.openqa.selenium.htmlunit.htmlunitdriver.get(htmlunitdriver.java:480) ... 32 more process finished exit code 255
this looks though local server wasn't started, may need introduce configuration profile in intellij start server you.
Comments
Post a Comment