docker-py icon indicating copy to clipboard operation
docker-py copied to clipboard

Accounting for asynchronous service removals

Open wk8 opened this issue 6 years ago • 1 comments

Swarmkit services' removal will soon become asynchronous (see https://github.com/moby/moby/pull/38525); that is, a service will only actually get deleted once all of its containers are shut down.

This patch changes service tests' tearDown to wait for services to be actually removed, so that there's no name collision with subsequent tests.

This change is fully backward compatible with the engine's current behaviour.

Couple of other misc changes: consolidated polling in a single wait_until_truthy function, and allowed passing more flags to py.test in the makefile test-integration targets through a new optional pytest_options env variable.

Signed-off-by: Jean Rouge [email protected]

wk8 avatar Jan 12 '19 01:01 wk8

Just to copy over what I said in moby/moby, there should be nothing to change in docker-py (or any API client). If docker-py is broken because of a proposed change in moby, then the proposed change is incorrect.

cpuguy83 avatar Jan 13 '19 04:01 cpuguy83