Skip to content

Commit cff1da2

Browse files
committed
Checking for ready value in containers
1 parent fbb65a4 commit cff1da2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/SmokeTests/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def smoke_test_container(self, port):
1010
build_version = os.environ.get('VERSION')
1111
current_attempts = 0
1212
max_attempts = 3
13-
sleep_interval = 2
13+
sleep_interval = 3
1414
status_fetched = False
1515
status_json = None
1616

@@ -19,13 +19,16 @@ def smoke_test_container(self, port):
1919
try:
2020
response = urllib2.urlopen('http://localhost:%s/wd/hub/status' % port)
2121
status_json = json.loads(response.read())
22+
self.assertTrue(status_json['value']['ready'], "Container is not ready on port %s" % port)
2223
status_fetched = True
2324
except Exception as e:
2425
time.sleep(sleep_interval)
2526

2627
self.assertTrue(status_fetched, "Container status was not fetched on port %s" % port)
2728
self.assertTrue(status_json['status'] == 0, "Wrong status value for container on port %s" % port)
28-
self.assertTrue(status_json['value']['build']['version'] == build_version, "Wrong build version in container on port %s" % port)
29+
self.assertTrue(status_json['value']['build']['version'] == build_version,
30+
"Wrong build version in container on port %s" % port)
31+
self.assertTrue(status_json['value']['ready'], "Container is not ready on port %s" % port)
2932

3033

3134
class NodeTest(SmokeTests):

0 commit comments

Comments
 (0)