We sometimes see this failure intermitently when using the FlexUnit Ant task to run tests in a CI environment. The Ant task throws this exception:
java.util.concurrent.ExecutionException: could not close client/server socket
I have seen this for a while now, and still see it with the latest 4.1 RC versions.
Here is the console output seen along with the above exception:
FlexUnit player target: flash
Validating task attributes ...
Generating default values ...
Using default working dir [C:\DJTE\commons.formatter_swc\d3flxcmn32\extracted\Source\Flex]
Using the following settings for the test run:
FLEX_HOME: [C:\dev\vert-d3flxcmn32\302100.41.0.20110323122739_d3flxcmn32]
haltonfailure: [false]
headless: [false]
display: [99]
localTrusted: [true]
player: [flash]
port: [1024]
swf: [C:\DJTE\commons.formatter_swc\d3flxcmn32\extracted\build\commons.for matter.tests.unit.swf]
timeout: [1800000ms]
toDir: [C:\DJTE\commons.formatter_swc\d3flxcmn32\reports\xml]
Setting up server process ...
Entry [C:\DJTE\commons.formatter_swc\d3flxcmn32\extracted\build] already available in local trust file at [C:\Users\user\AppData\Roaming\Macromedia\Flash Player\#Security\FlashPlayerTrust\flexUnit.cfg].
Executing 'rundll32' with arguments:
'url.dll,FileProtocolHandler'
'C:\DJTE\commons.formatter_swc\d3flxcmn32\extracted\build\commons.form atter.tests.unit.swf'
The ' characters around the executable and arguments are
not part of the command.
Starting server ...
Opening server socket on port [1024].
Waiting for client connection ...
Client connected.
Setting inbound buffer size to [262144] bytes.
Receiving data ...
Sending acknowledgement to player to start sending test data ...
Stopping server ...
End of test data reached, sending acknowledgement to player ...
When the problem occurs, it is not always during the running of any particular test (that I am aware of). Recent runs where this failure was seen had the following number of tests executed (note: the total number that should be run is 45677): 18021, 18, 229.
Here is a "good" run when the problem does not occur:
:
Setting inbound buffer size to [262144] bytes.
Receiving data ...
Sending acknowledgement to player to start sending test data ...
Stopping server ...
End of test data reached, sending acknowledgement to player ...
Closing client connection ...
Closing server on port [1024] ...
Analyzing reports ...
Suite: com.formatters.help.TestGeographicSiteUrls
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec
:
Suite: com.formatters.functionalUnitTest.testCases.TestNumericUDF
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.071 sec
Results :
Tests run: 45,677, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 201.186 sec
Has anyone else ran across this problem?
Thanks,
Trevor
Hey Trevor,
The only windows server I work with is our actual FlexUnit build server. It is not currently using the AIR runner just the flash runner.
When this kind of stuff happens I find its usually because the AIRCIListener is not being used. That is the tool that actually closes app. You would use that instead of the normal CI listener in your runner.
Confirm you have that working and if that is not it, I'll setup a task on the flexunit build server to run the air runner from ant and see if it is able to finish.
Thanks,
Simeon Bateman
Principal Instigator
Simb & Company
No sorry, I thought the problem was related to AIR.
The Listener you use is based on the the runtime environment, not the framework. So if you are running the tests in Flash Player, then the CI listener is good enough.
Consequently we are using this in our build system. In fact we build everything from the ground up each time, so we create the ant tasks and the listeners so that we can test the framework. And all our tests are passing which means the flash player was able to be closed.
Let me ask around and see if anyone else has seen anything odd.
Simeon Bateman
Well, after running the tests locally on my own machine, I discovered that the Flash Player is crashing during the test execution. I have never seen this before. I suppose it is time to ask the developer to attach the debugger and step through the tests? Is there perhaps any generic guidance I should provide to the owner of these tests?
thanks, Trevor
I am not sure if this information will help everyone, but here goes...
For us, these problems with FlexUnit tests crashing the Flash Player appear to be related to couple of factors. Recently, we moved up from Flex 3.2 to Flex 4.1 as our development baseline. Many people complained that their development environment (Flash Builder, etc.) was much more unstable. Apparently, 4.1 produces SWFs that require more memory to run than 3.2 does? Anyway, we still had Flash Player 10.1 as our runtime baseline. Apparently, that version of the player was not as capable of running larger FlexUnit test SWFs, and would crash (as I posted months earlier). I upgraded to the latest 10.3 standalone player versions, and the crashes have now ceased. It would be nice to know exactly what was causing the crashes, but memory management (or lack of) is my best guess.
So, if you are seeing these issues, try upgrading to the latest Flash Player version.
Regards,
Trevor
North America
Europe, Middle East and Africa
Asia Pacific