tag:support.gradlefx.org,2011-05-23:/discussions/problems/81-more-flexunit-woes-adl-hangsGradleFx: Discussion 2016-08-11T02:32:06Ztag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-22T17:19:17Z2013-03-22T17:19:17ZMore FlexUnit woes (adl hangs)<div><p>Forgot to attach my files :)</p></div>Nicolas Estradatag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-22T19:07:55Z2013-03-22T19:07:55ZMore FlexUnit woes (adl hangs)<div><p>I can already confirm that the issue is related to ADL.</p>
<p>What I have tried until now:</p>
<ul>
<li>I added <code>com/adobe/air/**/*</code> to the
<code>flexUnit.excludes</code></li>
<li>I removed all configuration for running the tests with AIR</li>
<li>The tests ran as expected (though there was one failure)</li>
</ul></div>Maxime Coweztag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-22T19:16:46Z2013-03-22T19:16:46ZMore FlexUnit woes (adl hangs)<div><p>I gradually started reintegrating your original build script,
and I can confirm that it runs normally. (Should've tried that in
the first place, grmbl). So discard that previous comment.<br>
It looks like the issue is related to your build environment. Can
you give us the specifics of your environment.</p></div>Maxime Coweztag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-22T22:06:21Z2013-03-22T22:06:21ZMore FlexUnit woes (adl hangs)<div><p>I think this can be related to this issue: <a href=
"https://gradlefx.tenderapp.com/discussions/problems/57-flexunit-41-compilation-problem-with-locale">
https://gradlefx.tenderapp.com/discussions/problems/57-flexunit-41-...</a></p>
<p>To summarize, I was able to reproduce the issue with ant +
flexUnit. And for some reason it didn't work on my pc, but it
worked on Michael Labriola's pc. But I haven't had time to
investigate this any further. The referenced thread should have my
test case as attachment.</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-23T10:57:31Z2013-03-23T10:57:31ZMore FlexUnit woes (adl hangs)<div><p>If it works on one PC and not the other, I guess it should be
environment-related.</p>
<p>It works on mine with:</p>
<ul>
<li>Windows 7 32-bit</li>
<li>Java 1.7.0_02 32-bit</li>
<li>Groovy 1.8.6</li>
<li>Ivy 2.2.0</li>
<li>ANT 1.8.4</li>
<li>Gradle 1.4</li>
<li>GradleFx 0.6.4</li>
<li>Flex 4.6</li>
<li>FlexUnit 4.1.0-8 (latest binary version)</li>
</ul></div>Maxime Coweztag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-23T11:46:09Z2013-03-23T11:46:09ZMore FlexUnit woes (adl hangs)<div><p>Can you try to run this ant script and see if that also works:
<a href=
"https://docs.google.com/open?id=0BwgTrjDn2SAhSmhkWmlQbFlXQ0k">https://docs.google.com/open?id=0BwgTrjDn2SAhSmhkWmlQbFlXQ0k</a></p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-24T22:45:09Z2013-03-24T22:45:09ZMore FlexUnit woes (adl hangs)<div><p>Yes, it runs: with one failing test as a result.</p>
<p>Did this one with standalone ANT 1.9.0</p>
<p>I'll try to have a colleague with a 64-bit Win run this
tomorrow.</p></div>Maxime Coweztag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-25T07:15:31Z2013-03-25T07:15:31ZMore FlexUnit woes (adl hangs)<div><p>My ant script also works on my work pc:</p>
<ul>
<li>Windows 7 64-bit</li>
<li>Java jdk1.7.0_11 64-bit</li>
<li>ANT 1.8.4</li>
<li>Flex 4.6</li>
<li>FlexUnit 4.1.0-8-flex_4.1.0.16076</li>
</ul>
<p>But it doesn't work on my pc at home.</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-25T09:42:06Z2013-03-25T09:42:06ZMore FlexUnit woes (adl hangs)<div><p>Damn! My money was on a 64-bit issue.<br>
The adl used is the one that comes with the SDK, right? So those
should be the same as long as you use the same SDK.</p></div>Maxime Coweztag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-25T10:07:11Z2013-03-25T10:07:11ZMore FlexUnit woes (adl hangs)<div><p>Indeed, it's the one in the SDK.</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-25T19:24:23Z2013-03-25T19:24:24ZMore FlexUnit woes (adl hangs)<div><p>Well FYI this is my environment:</p>
<ol>
<li>Windows 7 x64 (and Cygwin)<br></li>
<li>Java jdk1.7.0_13 64-bit<br></li>
<li>Gradle 1.4 (and the ant & groovy version which come with
it)<br></li>
<li>GradleFx 0.6.4<br></li>
<li>FlexUnit 4.1.0-8 (latest binary version)<br></li>
<li>Ant 1.8.4</li>
</ol>
<p>Now I've noticed a couple of odd things, and being new to Flex
(but not new to gradle) maybe you can shed some light:<br>
1. Now I'm able to run the ant test target, and all but 1 test
fail, however adl.exe hangs after running the test suite (perhaps
related to the bug above)<br>
2. Using the same FLEX_HOME and the same FLEXUNIT_LIBS (I modified
the build.xml) using gradlefx I can see in the reports dir that
some tests are generated (presence of XML report files) however
half aren't.<br>
3. Is it normal that I can't see any stdout/err when running using
gradlefx? Is it possible that not capturing the ant task output is
what is preventing adl from running properly?</p>
<p>I would be glad to try out someone's build.gradle so that I can
see if the problem is indeed purely environment related, although
if ant works I don't see why gradlefx wouldn't. The only thing I
can think of is that gradlefx generates a TestRunner.swf and the
ant builds one based on an mxml file (CoreLibTestRunner in this
specific case)</p>
<p>Thanks for any help! :)</p></div>Nicolas Estradatag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-25T20:28:37Z2013-03-25T20:28:37ZMore FlexUnit woes (adl hangs)<div><p>Hi Nicolas,</p>
<p>Can you also try this ant script: <a href=
"https://docs.google.com/open?id=0BwgTrjDn2SAhSmhkWmlQbFlXQ0k">https://docs.google.com/open?id=0BwgTrjDn2SAhSmhkWmlQbFlXQ0k</a></p>
<p>You have to set the FLEX_HOME variable in the script and then
you can run it by just executing the "ant" command.</p>
<p>Thanks</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-26T09:37:48Z2013-03-26T09:37:49ZMore FlexUnit woes (adl hangs)<div><p>Works like a charm. ADL is able to execute the test, and it
quits normally. I ran this under cygwin on my Win7 x64 machine.
I've attached the output in case it helps at all.</p></div>Nicolas Estradatag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-26T13:07:02Z2013-03-26T13:07:03ZMore FlexUnit woes (adl hangs)<div><p>Thank you Yennick!<br>
Your little project helped me figure out what I needed to do! So I
began importing all of the .as files as well as the test .as files
into your little flexunit ANT project and after some tests ADL was
hanging again.</p>
<p>So I looked around at this site : <a href=
"http://livedocs.adobe.com/flex/3/html/help.html?content=logging_04.html">
Configuring the debugger version of Flash Player</a></p>
<p>and after creating the file <code>mm.cfg</code> in
C:/Users/nestrada containing :<br></p>
<pre>
<code>ErrorReportingEnable=1
MaxWarnings=500
TraceOutputFileEnable=1</code>
</pre>
<p>It works! I was able to compile and TEST with gradlefx :)
Perhaps you can note this in the documentation if it is not already
there ;)</p></div>Nicolas Estradatag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-26T13:59:27Z2013-03-26T13:59:27ZMore FlexUnit woes (adl hangs)<div><p>Awesome! This brings us one step further in the process of
solving this. While editing the mm.cfg file is a reasonable
temporary solution, it is not ideal when you want to share your
project with others.</p>
<p>I'll try this out on my pc at home tomorrow and see if it's also
solved there with the mm.cfg config.</p>
<p>Thanks for investigating this further!</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/260276642013-03-28T16:46:48Z2013-03-28T16:46:48ZMore FlexUnit woes (adl hangs)<div><p>For some reason I can't reproduce the problem anymore on any of
my pc's with the ant script, while it has been failing in the past.
Must be witchcraft...</p></div>Yennick Trevelstag:support.gradlefx.org,2011-05-23:Comment/260276642013-07-11T09:27:06Z2013-07-11T09:27:10ZMore FlexUnit woes (adl hangs)<div><p>Worked for me. Thanks!</p></div>NagRocktag:support.gradlefx.org,2011-05-23:Comment/260276642013-07-23T11:39:24Z2013-07-23T11:39:24ZMore FlexUnit woes (adl hangs)<div><p>Actually only the ErrorReportingEnable=1 setting is
required.<br>
I have also noticed that FlashDevelop magically creates the mm.cfg
file with the ErrorReportingEnable=1 setting.</p></div>sorin.portasetag:support.gradlefx.org,2011-05-23:Comment/260276642013-08-08T19:29:51Z2013-08-08T19:29:52ZMore FlexUnit woes (adl hangs)<div><p>Thanks for the solution. Adding the mm.cfg helped me as
well!</p></div>Szymon Bochniaktag:support.gradlefx.org,2011-05-23:Comment/260276642016-03-07T09:09:01Z2016-03-07T09:09:01ZMore FlexUnit woes (adl hangs)<div><p>I think I've found the actual cause of this issue and documented
the troubleshooting process and solution in the GradleFx
documentation: <a href="http://doc.gradlefx.org/en/latest/flexunit.html#my-unit-tests-hang-and-then-end-with-a-sockettimeoutexception-what-is-wrong">
http://doc.gradlefx.org/en/latest/flexunit.html#my-unit-tests-hang-...</a></p></div>Yennick Trevels