Auto-Test Issue with Play 1.2.3

已查看 312 次
跳至第一个未读帖子

Keith Swallow

未读,
2011年8月27日 16:57:322011/8/27
收件人 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

未读,
2011年8月29日 03:35:202011/8/29
收件人 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

未读,
2011年8月29日 06:11:462011/8/29
收件人 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

未读,
2011年8月31日 05:52:592011/8/31
收件人 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

未读,
2011年9月1日 05:04:532011/9/1
收件人 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

未读,
2011年9月1日 07:57:412011/9/1
收件人 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

未读,
2011年9月1日 12:28:382011/9/1
收件人 play-fr...@googlegroups.com
Hi Caroline,

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

Cheers,

Keith

digiarnie

未读,
2011年10月10日 19:56:472011/10/10
收件人 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

未读,
2011年10月28日 17:54:552011/10/28
收件人 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.
回复全部
回复作者
转发
0 个新帖子