Auto-Test Issue with Play 1.2.3

312 views
Skip to first unread message

Keith Swallow

unread,
Aug 27, 2011, 4:57:32 PM8/27/11
to play-fr...@googlegroups.com
Hey All,

I just upgraded to Play 1.2.3 and now $ play auto-test does not work anymore. A friend of mine is using play 1.2.2 on the same project and auto-test works for them. Is anyone else having this issue?

Specifically auto-test just hangs there after the line "Go to http://localhost:9000/@tests to run the tests" and never actually runs. If I navigate to the /@tests page it works fine. Basically auto-test is now the same as test.

Cheers,

Keith

Rauli Poikela

unread,
Aug 29, 2011, 3:35:20 AM8/29/11
to play-framework
Auto-test broke down for me too. In my case the reason is a
FileNotFoundException, Play somehow seemed to read the configuration
wrong and assume that there is a keystore configured when there
isn't.

On Aug 27, 11:57 pm, Keith Swallow <keithc...@gmail.com> wrote:
> Hey All,
>
> I just upgraded to Play 1.2.3 and now $ play auto-test does not work anymore. A friend of mine is using play 1.2.2 on the same project and auto-test works for them. Is anyone else having this issue?
>
> Specifically auto-test just hangs there after the line "Go tohttp://localhost:9000/@teststo run the tests" and never actually runs. If I navigate to the /@tests page it works fine. Basically auto-test is now the same as test.
>
> Cheers,
>
> Keith

Mark Piper

unread,
Aug 29, 2011, 6:11:46 AM8/29/11
to play-fr...@googlegroups.com
I suspect you're seeing the result of http://play.lighthouseapp.com/projects/57987-play-framework/tickets/943, which has been fixed in master but presumably not applied to the 1.2.x branch.

It's a simple one line change in a python script - in frameworks/pym/play/commands/base.py, change "if line.find('/@tests to run the tests') > -1:" to "if line.find('Listening for HTTP') > -1:"

Rauli Poikela

unread,
Aug 31, 2011, 5:52:59 AM8/31/11
to play-framework
Hi,

It's not this. In my 1.2.3 installation, the line reads already "if
line.find('Listening for HTTP') > -1:"

On Aug 29, 1:11 pm, Mark Piper <revbi...@gmail.com> wrote:
> I suspect you're seeing the result ofhttp://play.lighthouseapp.com/projects/57987-play-framework/tickets/943,

Mark Piper

unread,
Sep 1, 2011, 5:04:53 AM9/1/11
to play-fr...@googlegroups.com
The other possible issue is http://play.lighthouseapp.com/projects/57987/tickets/956-differing-behaviour-for-auto-test-and-autotest  (This ought to be resolved in 1.2.3 but maybe not, I haven't checked)

Are you using "auto-test" or "autotest"? (note the missing hyphen)

If it's not that, I'm out of ideas :)

Caroline Orr

unread,
Sep 1, 2011, 7:57:41 AM9/1/11
to play-framework
I also had this problem but it was only occurring on some of my
projects, not all of them. Very confusing!
In the end it turned about to be a problem with my log4j
configuration. It's working now with a logging configuration as below:
log4j.rootLogger=INFO, CONSOLE

log4j.logger.play=DEBUG, FILE

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %-5p %c ~
%m%n

log4j.appender.FILE=org.apache.log4j.RollingFileAppender
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d{ISO8601} %-5p %c ~ %m
%n
log4j.appender.FILE.File=play.log

You could give this a try and see if it works for you too?

Keith Swallow

unread,
Sep 1, 2011, 12:28:38 PM9/1/11
to play-fr...@googlegroups.com
Hi Caroline,

I tried your log4j file and saw no change in behavior. Thanks for your suggestion.

Cheers,

Keith

digiarnie

unread,
Oct 10, 2011, 7:56:47 PM10/10/11
to play-framework
I'm seeing the same issue with 1.2.3. Has anyone got a work around or
fix? For the time being, I have to delete/rename my log4j.properties
in the conf directory to get auto-test to work.

Alejandro Luján

unread,
Oct 28, 2011, 5:54:55 PM10/28/11
to play-framework
I have tried the following logging configuration successfully:

application.log.path=/log4j.mine.properties
%test.application.log.path=/log4j.empty.properties

Where log4j.empty.properties is an empty file. This is good enough for
me, since I can then grab the system.out file and copy it after the
tests are finished.

If you need to keep your log4j configuration while running tests, this
might not be enough.
Reply all
Reply to author
Forward
0 new messages