timeout when prepare

62 views
Skip to first unread message

ivan wang

unread,
Jan 11, 2011, 10:31:47 AM1/11/11
to Mockolate
Hi, all,

When I call "prepare" in [Before] method, I ran into
"org.sonatype.flexmojos.test.TestRunnerException: Read timed out"
after running it with Flexmojos.
I think it's because I'm trying to prepare a MXML. Because if I
changed it to some pure AS class like a "model", it works.

Is there any limitation that it cannot prepare MXML Class or it has
something to do with the complexity of the MXML itself?
Below is the snippet, Thanks in advance.


[Before(async, timeout=5000)]
public function prepareMockolates():void
{
dispatcher = EventDispatcherFactory.getEventDispatcher();

proceedWhen(
prepare(MasterView),
Event.COMPLETE);
}

Drew Bourne

unread,
Jan 11, 2011, 6:22:05 PM1/11/11
to mock...@googlegroups.com
Hi Ivan,

I suspect its the complexity of the MXML file and the timeout may be too short.

If your MasterView class is complicated could you try with another
simpler MXML file.

cheers,
Drew

Ivan Wang

unread,
Jan 13, 2011, 9:24:08 AM1/13/11
to mock...@googlegroups.com
Hi, Drew,

Thanks for the heads up. The fact is it passes in Flash Builder but fails in Flexmojos.
I tried a MXML only extends the Group container, also fails.
Then I tried a pure AS class that simply extends UIComponent, still can't pass. If I remove the "extends" part, It works. So I assume it can't prepare any UI class. Below is the error:

[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-beta-5:test-run (default-test-run) on project test-mocholate: Read timed out - E:\work\2011.1\test-mocholate\target\test-classes\TestRunner.swf -> [Help 1]

Have you ever tried in Flexmojos?

Thanks
Ivan


-----邮件原件-----
发件人: mock...@googlegroups.com [mailto:mock...@googlegroups.com] 代表 Drew Bourne
发送时间: 2011年1月12日 7:22
收件人: mock...@googlegroups.com
主题: Re: timeout when prepare

Drew Bourne

unread,
Jan 13, 2011, 5:48:08 PM1/13/11
to mock...@googlegroups.com
Hi Ivan,

No sorry I haven't used FlexMojos.

I know their mailing list is usually pretty good. Perhaps their
generated test runner does not support FlexUnit 4.1 yet? (I assume
you're using FlexUnit 4.1 and the MockolateRule, let me know if thats
not the case).

cheers,
Drew

Ivan Wang

unread,
Jan 14, 2011, 9:16:57 PM1/14/11
to mock...@googlegroups.com
Hi, Drew,

Thanks for the reply. I just imported my project to FlashBuilder and run the
unit test inside it, Mockolate total works, great work! Btw, I'm not using
MockolateRule, still using prepare method.

Yet, I guess I might as well hold on the Flexmojos for unit tests before
finish them in FB.

Still 2 questions,
1. What do you usually use to run these tests? Because I assume it's a
very common requirement to run unittest in a CI env like Hudson.
2. Whenever I launch any UT in FB, it auto adds some default flexunit 4.
0 libs to build path. But I manually added FlexUnit 4.1 to my build path,
how can I ensure it's using 4.1 other than 4.0?

Thanks
Ivan

-----邮件原件-----
发件人: mock...@googlegroups.com [mailto:mock...@googlegroups.com] 代表
Drew Bourne

发送时间: 2011年1月14日 6:48
收件人: mock...@googlegroups.com
主题: Re: 答复: timeout when prepare

Hi Ivan,

No sorry I haven't used FlexMojos.

Reply all
Reply to author
Forward
0 new messages