Kaydet (Commit) 8aded484 authored tarafından Joffrey F's avatar Joffrey F

Retry on connection error

üst f75afc92
......@@ -2148,10 +2148,17 @@ class StreamTest(Cleanup, unittest.TestCase):
b'\r\n'
) + b'\r\n'.join(lines)
client = docker.Client(base_url="http+unix:/" + self.socket_file)
stream = client.build(
path=os.path.dirname(self.build_context),
stream=True)
client = docker.Client(base_url="http+unix://" + self.socket_file)
for i in range(5):
try:
stream = client.build(
path=os.path.dirname(self.build_context),
stream=True
)
break
except requests.ConnectionError as e:
if i == 4:
raise e
self.assertEqual(list(stream), [
str(i).encode() for i in range(50)])
......
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