Hi guys,

help me to resolve this problem. I'll tell you the whole story :)

A week ago i've set up a Jenkins server, installed django-jenkins, and set 
up a job for my tests and pylint, pep8 etc.

In my tests i have selenium tests, with setup and teardown methods.

Everything worked smooth until, two days after the setup, i get these 
errors:

https://gist.github.com/apelliciari/5111162 

That's strange, i think, i didn't change a line of code, why this?

Then i read that the error "Failed to shutdown the live test server in 2 
seconds" can depend from the setup and teardown functions of my selenium 
tests, and i realize from the "address in use" and this django 
note<https://docs.djangoproject.com/en/1.4/topics/testing/#live-test-server>: 


"In the case where the tests are run by multiple processes in parallel (for 
example, in the context of several simultaneous builds), the processes will 
compete for the same address, and therefore your tests might randomly fail 
with an “Address already in use” error.".

So, understanding that my test run in parallel, i've changed my setup and 
teardown methods to the class method setUpClass and tearDownClass, and i've 
set a range of addresses instead of one.

The result is: https://gist.github.com/apelliciari/5111735

The tests now pass, but i get at the end a "cannot allocate memory" in 
popen / fork. I've tried to look up for a solution (finding Python 
subprocess.Popen "OSError: [Errno 12] Cannot allocate 
memory"<http://stackoverflow.com/questions/1367373/python-subprocess-popen-oserror-errno-12-cannot-allocate-memory>and
 
http://bramp.net/blog/2010/05/python-close_fds-issue/) but i didn't find it.

So, now i've a jenkins build that's marked "failure", caused by the memory 
error, even if the tests pass. That's a paradox!
*
Please tell me if there's a way to run test not in parallel, to avoid all 
these problems!* What can i do now? Or is there something i can do to fix 
the memory error?

The port range is a problem too with functional selenium test that involve 
Facebook, because facebook's apps accept only one domain and port.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to