Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "heat: convert open to context manager"
[yardstick.git]
/
yardstick
/
benchmark
/
scenarios
/
networking
/
ping.py
diff --git
a/yardstick/benchmark/scenarios/networking/ping.py
b/yardstick/benchmark/scenarios/networking/ping.py
index
b41aa0d
..
d208146
100644
(file)
--- a/
yardstick/benchmark/scenarios/networking/ping.py
+++ b/
yardstick/benchmark/scenarios/networking/ping.py
@@
-9,6
+9,8
@@
# ping scenario
# ping scenario
+from __future__ import print_function
+from __future__ import absolute_import
import pkg_resources
import logging
import pkg_resources
import logging
@@
-55,7
+57,7
@@
class Ping(base.Scenario):
self.connection = ssh.SSH(user, ip, key_filename=key_filename,
port=ssh_port)
self.connection = ssh.SSH(user, ip, key_filename=key_filename,
port=ssh_port)
- self.connection.wait()
+ self.connection.wait(
timeout=600
)
def run(self, result):
"""execute the benchmark"""
def run(self, result):
"""execute the benchmark"""
@@
-100,7
+102,7
@@
class Ping(base.Scenario):
def _test(): # pragma: no cover
def _test(): # pragma: no cover
- '''internal test function'''
+ """internal test function"""
key_filename = pkg_resources.resource_filename("yardstick.resources",
"files/yardstick_key")
ctx = {
key_filename = pkg_resources.resource_filename("yardstick.resources",
"files/yardstick_key")
ctx = {
@@
-122,7
+124,8
@@
def _test(): # pragma: no cover
p = Ping(args, ctx)
p.run(result)
p = Ping(args, ctx)
p.run(result)
- print result
+ print(result)
+
if __name__ == '__main__': # pragma: no cover
_test()
if __name__ == '__main__': # pragma: no cover
_test()