TeamCty & FlexUnit

Hi all,

I need to run FlexUnit test on TemCity (agent).

When running FlexUnit tests by flex-mojo maven plugin it loads FlashPlayer instance, but FlashPlayer needs display to run itself.

When I run maven in terminal under X session or under Windows - it works just fine.
When I run maven from TeamCity (which runs with or without a display) - it constatly fails: when ran from agent, maven can't instantiate FlashPlayer.

The question is: how I can configure TeamCity to run agent in screen mode, so it will be able to run FlashPlayer?

Maven reported next error:

Loading configuration file C:\TeamCity\buildAgent\work\741796eb2b4d6e6a\e2f\e2f-client\target\classes\config.xml

opened server socket
-


BUILD ERROR
-


timeout waiting for flexunit report

Embedded error: Accept timed out

Thanx a lot.

3 comments

Hi,

I've got the same problem, both on Linux and Windows.

STDOUT spit by "mvn clean install" by TEamCity agent (broken):
=============================================
\[INFO\] \[flex-compiler-mojo:test-run\]
opened server socket
\[INFO\]
\[ERROR\] BUILD ERROR
\[INFO\]
\[INFO\] timeout waiting for flexunit report

Embedded error: Accept timed out
\[INFO\]
\[INFO\] For more information, run Maven with the -e switch
\[INFO\]
\[INFO\] Total time: 3 minutes 53 seconds
\[INFO\] Finished at: Fri Jun 13 12:03:07 EEST 2008
\[INFO\] Final Memory: 28M/203M
\[INFO\]
=============================================

My observations:
1. Maven2 runs at TeamCity agent machine.
2. When Flex tests are being run, Maven2/flex-compiler-mojo opens a server socket (message "opened server socket").
3. Then Maven2/flex-compiler-mojo executes standalone Flash player, telling which port to connect (the one from p.2)
4. Flashplayer runs fine itself, but it is unable to connect to a port where Maven2/flex-compiler-mojo listens.
5. Maven2/flex-compiler-mojo fails on time-out (message "timeout waiting for flexunit report Embedded error: Accept timed out")

NOTE: when I run "mvn clean install" in project dir from Linux console or Windows command line - it runs fine.

STDOUT spit by "mvn clean install" from console (healthy):
=============================================
\[INFO\] \[flex-compiler-mojo:test-run\]
opened server socket
accepting data from client
Running com.myproject.Test1
Tests run: 4, Failures: 0, Errors: 0, Time Elapsed: 0 sec
end of test
Running com.myproject.Test2
Tests run: 3, Failures: 0, Errors: 0, Time Elapsed: 0 sec
end of test
Running com.myproject.Test3
Tests run: 2, Failures: 0, Errors: 0, Time Elapsed: 0 sec
end of test
end of test run
=============================================


CONCLUSION: it seems that the problem is in TeamCity agent: it looks like incoming connections are blocked.
Probably some "policy" config for the agent (like applets) or smth like that.

I haven't found the solution yet.

Please, help to fight it.

0

Have you tried to launch agent via agent.bat under Windows?

--
Pavel Sher

0

Thanks for pointing.


What I did:
0. Write a symlink for /usr/local/gflashplayer <- and add display 5 there (so it will not interfere with my X/NoMachine sessions).

Then, in "/etc/rc.local":
1. Create framebuffer on display 5
2. "runAll.sh" with creds of a user

It didn't work, the socket was never open (my issue above).


Then I changed point 2 to this:
2. Put 2 calls in "/etc/rc.local": run teamcity server + run agent.

Same thing, doesn't work


Then I changed to this (SOLUTION):
2. Run teamcity server from "rc.local"
3. Login via ssh to target machine, run agent, close console

Not elegant (I need to run agent manually after reboot), but it does work.

0

Please sign in to leave a comment.