Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding timeouts to tests

  • Loading branch information...
commit 9921a92be2d9af34798bf8bce4fcf6340eb9e7fe 1 parent 7f8d2ba
@buzztroll buzztroll authored
View
8 tests/cc-prop-test.py
@@ -18,7 +18,7 @@
except:
pass
cmd = "%s/bin/cloud-client.sh --transfer --sourcefile %s" % (cc_home, tst_image_src)
-(x, rc)=pexpect.run(cmd, withexitstatus=1)
+(x, rc)=pexpect.run(cmd, withexitstatus=True)
cmd = "%s/bin/cloud-client.sh --run --name %s --hours .25 --newname %s" % (cc_home, tst_image_name, newname)
child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile)
@@ -34,16 +34,16 @@
cmd = "%s/bin/cloud-client.sh --handle %s --save" % (cc_home, handle)
print cmd
-(x, rc)=pexpect.run(cmd, withexitstatus=1)
+(x, rc)=pexpect.run(cmd, withexitstatus=True, timeout=to)
print x
if rc != 0:
print "failed to save"
sys.exit(1)
cmd = "%s/bin/cloud-client.sh --list" % (cc_home)
-(x, rc)=pexpect.run(cmd, withexitstatus=1)
+(x, rc)=pexpect.run(cmd, withexitstatus=True)
cmd = "%s/bin/cloud-client.sh --download --name %s --localfile %s" % (cc_home, newname, newname)
print cmd
-(x, rc)=pexpect.run(cmd, withexitstatus=1)
+(x, rc)=pexpect.run(cmd, withexitstatus=True, timeout=to)
print x
if rc != 0:
print "failed to terminate"
View
4 tests/cc-submit-common-unprop-size-test.py
@@ -25,7 +25,7 @@
sys.exit(1)
cmd = "%s/bin/cloud-client.sh --run --name %s --hours .25" % (cc_home, common_image)
-child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile)
+child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile, timeout=to)
rc = child.expect ('Running:')
if rc != 0:
print "Running not found in the list"
@@ -38,7 +38,7 @@
cmd = "%s/bin/cloud-client.sh --save --handle %s" % (cc_home, handle)
print cmd
-(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile)
+(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
print x
if rc != 0:
print "failed to terminate"
View
8 tests/cc-unprop-md5test.py
@@ -28,10 +28,10 @@
size=os.path.getsize(src_file)
cmd = "%s/bin/cloud-client.sh --transfer --sourcefile %s" % (cc_home, src_file)
- (x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile)
+ (x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
cmd = "%s/bin/cloud-client.sh --run --name %s --hours .25" % (cc_home, image_name)
- child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile)
+ child = pexpect.spawn (cmd, timeout=to, maxread=20000, logfile=logfile, timeout=to)
rc = child.expect ('Running:')
if rc != 0:
print "Running: not found in the list"
@@ -44,7 +44,7 @@
cmd = "%s/bin/cloud-client.sh --handle %s --save --newname %s" % (cc_home, handle, newname)
print cmd
- (x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile)
+ (x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
print x
if rc != 0:
print "failed to save"
@@ -53,7 +53,7 @@
# down load the new name with s3cmd
cmd="s3cmd get s3://Repo/VMS/%s/%s %s" % (os.environ['NIMBUS_TEST_USER_CAN_ID'], image_name, localfile)
print cmd
- (x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile)
+ (x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
print x
if rc != 0:
print "failed to save"
View
6 tests/cc-unprop-readwrite-test.py
@@ -34,7 +34,7 @@
cmd = "%s/bin/cloud-client.sh --handle %s --save --newname %s" % (cc_home, handle, newname)
print cmd
-(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile)
+(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
print x
if rc != 0:
print "failed to save"
@@ -60,9 +60,9 @@
sys.exit(1)
cmd = "%s/bin/cloud-client.sh --delete --name %s" % (cc_home, newname)
-(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile)
+(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
cmd = "%s/bin/cloud-client.sh --delete --name %s" % (cc_home, image_name)
-(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile)
+(x, rc)=pexpect.run(cmd, withexitstatus=1, logfile=logfile, timeout=to)
sys.exit(0)
Please sign in to comment.
Something went wrong with that request. Please try again.