Commit 6708c75a authored by Jérome Perrin's avatar Jérome Perrin

ERP5TypeFunctionalTestCase: wait a bit longer for Xvfb to start

When running on testnode, runUniTest is responsible for picking a free $DISPLAY.
This is implemented by starting Xvfb on a $DISPLAY, waiting a bit and if it is
still running we assume the $DISPLAY was free. But it seems sometimes we don't
wait enough, when testnodes are overloaded.

This implementation is wrong, we could run a command check that X is running,
but as explained in the code command below, xdpyinfo or other tools are
currently not available in test environment. Since we are considering switching
this to seleniumserver (which would take care of running a X Server for us) so
this is OK for now.
parent 3912504f
......@@ -127,8 +127,10 @@ class Xvfb(Process):
(xvfb_bin, '-fbdir' , self.fbdir, display,
'-screen', '0', '1280x1024x24'),
stdout=null, stderr=null, close_fds=True)
# try to check if X screen is available
time.sleep(5)
# XXX We don't have any easy way to wait for Xvfb server to be available
# for now we wait for a few seconds and if Xvfb process is still running,
# we assume it's OK.
time.sleep(20)
return
# XXX xdpyinfo is not installed yet. Is this checking really needed ?
# If it is required, we have to make xdpyinfo available as part of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment