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

This commit is contained in:
Calen Pennington
2012-10-30 15:51:21 -04:00
parent e8be6b3111
commit cd9fbaeb02
3 changed files with 6 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ MITX_FEATURES = {
'ENABLE_DISCUSSION_SERVICE': False,
'AUTH_USE_MIT_CERTIFICATES' : False,
}
ENABLE_JASMINE = False
# needed to use lms student app
GENERATE_RANDOM_USER_CREDENTIALS = False

View File

@@ -30,6 +30,7 @@ from .discussionsettings import *
################################### FEATURES ###################################
COURSEWARE_ENABLED = True
ENABLE_JASMINE = False
GENERATE_RANDOM_USER_CREDENTIALS = False
PERFSTATS = False

View File

@@ -48,7 +48,11 @@ def django_for_jasmine(system)
puts django_pid
jasmine_url = 'http://localhost:12345/_jasmine/'
up = false
start_time = Time.now
until up do
if Time.now - start_time > 30
abort "Timed out waiting for server to start to run jasmine tests"
end
begin
response = Net::HTTP.get_response(URI(jasmine_url))
puts response.code