Randomize ports used by jasmine tests
This prevents multiple tests running in parallel from stomping on each other.
This commit is contained in:
5
rakefile
5
rakefile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user