Skip to content
Snippets Groups Projects
Commit b3c470ec authored by Calen Pennington's avatar Calen Pennington
Browse files

Randomize ports used by jasmine tests

This prevents multiple tests running in parallel from stomping on each
other.
parent f2cd0bbc
No related merge requests found
......@@ -48,10 +48,11 @@ def django_for_jasmine(system, django_reload)
reload_arg = '--noreload'
end
port = 10000 + rand(40000)
django_pid = fork do
exec(*django_admin(system, 'jasmine', 'runserver', '-v', '0', "12345", reload_arg).split(' '))
exec(*django_admin(system, 'jasmine', 'runserver', '-v', '0', port.to_s, reload_arg).split(' '))
end
jasmine_url = 'http://localhost:12345/_jasmine/'
jasmine_url = "http://localhost:#{port}/_jasmine/"
up = false
start_time = Time.now
until up do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment