Commit cd9fbaeb by Calen Pennington

Add timeout so that jasmine tests eventually fail if the server doesn't start

parent e8be6b31
...@@ -35,6 +35,7 @@ MITX_FEATURES = { ...@@ -35,6 +35,7 @@ MITX_FEATURES = {
'ENABLE_DISCUSSION_SERVICE': False, 'ENABLE_DISCUSSION_SERVICE': False,
'AUTH_USE_MIT_CERTIFICATES' : False, 'AUTH_USE_MIT_CERTIFICATES' : False,
} }
ENABLE_JASMINE = False
# needed to use lms student app # needed to use lms student app
GENERATE_RANDOM_USER_CREDENTIALS = False GENERATE_RANDOM_USER_CREDENTIALS = False
......
...@@ -30,6 +30,7 @@ from .discussionsettings import * ...@@ -30,6 +30,7 @@ from .discussionsettings import *
################################### FEATURES ################################### ################################### FEATURES ###################################
COURSEWARE_ENABLED = True COURSEWARE_ENABLED = True
ENABLE_JASMINE = False
GENERATE_RANDOM_USER_CREDENTIALS = False GENERATE_RANDOM_USER_CREDENTIALS = False
PERFSTATS = False PERFSTATS = False
......
...@@ -48,7 +48,11 @@ def django_for_jasmine(system) ...@@ -48,7 +48,11 @@ def django_for_jasmine(system)
puts django_pid puts django_pid
jasmine_url = 'http://localhost:12345/_jasmine/' jasmine_url = 'http://localhost:12345/_jasmine/'
up = false up = false
start_time = Time.now
until up do until up do
if Time.now - start_time > 30
abort "Timed out waiting for server to start to run jasmine tests"
end
begin begin
response = Net::HTTP.get_response(URI(jasmine_url)) response = Net::HTTP.get_response(URI(jasmine_url))
puts response.code puts response.code
......
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