ruby on rails - Continuous Integration - Running parallel tests suites that require xvfb -


i'm having issues parallel builds running require xvfb server. using headless ruby gem, had sporadic failures when test suites both require capybara-webkit , xvfb server running in parallel.

my guess both trying use same display, attempted set different display values , run them in parallel, there still failure.

i tried removing headless gem , running test suite with: display=localhost:$display_num.0 xvfb-run bundle exec rake $display_num set bash variable different between 2 test suites.

i error: xvfb-run: error: xvfb failed start when run in parallel.

any assistance on deciphering great!

here gist, need start 1 headless per process.

this done features/support/javascript.rb file referenced in gist, relevant section being:

# unnecessary on mac if (!os.mac? && !$headless_started)      require 'headless'     # allow display autopick (by default)     # allow each headless destroy_at_exit (by default)     # allow each process have own headless setting reuse: false     headless_server = headless.new(:reuse => false)     headless_server.start      $headless_started = true     puts "process[#{process.pid}] started headless server display: #{headless_server.display}" end 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -