mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Subject Re: Review Request 65727: Moved `*DOCKER*` tests to `DockerContainerizerHealthCheckTest`.
Date Wed, 21 Feb 2018 19:26:18 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65727/#review198010
-----------------------------------------------------------


Ship it!




To expand on why this change was necessary: each `DOCKER` test requires (a) Docker to be available
and (b) the images to be pulled. The `DOCKER` test filter correctly satisfies (a), that is,
if `docker` isn't available the test isn't run. However, the previous logic had the image
pulling in `SetUpTestCase`, which was run once for the whole test suite, and therefore wasn't
affected by the `DOCKER` filter, meaning `docker pull` would run (and fail) if Docker wasn't
installed, since the suite had tests other than `DOCKER` tests.

So we need the `docker pull` logic to be executed if and only if Docker is available. We already
have logic for checking this on a per-test basis, the `DOCKER` filter. So the code was moved
to `SetUp`, which is run for each test. The code is in essence idempotent; once the images
are pulled, pulling again is a no-op since they're cached (and the logging is done with `LOG_FIRST_N(...,
1)`. Furthermore, the tests were constrained to a suite consisting of _all_ `DOCKER` tests
(the `DockerContainerizerHealthCheckTests`), and it's reasonable to assume that all tests
added to this suite will use the `DOCKER` filter.

- Andrew Schwartzmeyer


On Feb. 21, 2018, 6:11 a.m., Akash Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65727/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2018, 6:11 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Andrew Schwartzmeyer, Gaston Kleiman,
and Joseph Wu.
> 
> 
> Bugs: MESOS-8498
>     https://issues.apache.org/jira/browse/MESOS-8498
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> In `health_check_tests.cpp`, the `*DOCKER*` tests were moved to
> `DockerContainerizerHealthCheckTest::Setup`, so that pre-pulling only
> happens if the test is actually run. This avoids failing the test suite
> due to the pull failing when docker isn't installed.
> 
> 
> Diffs
> -----
> 
>   src/tests/health_check_tests.cpp 1893c85169f5e94e164434b93e6a24268224225d 
> 
> 
> Diff: https://reviews.apache.org/r/65727/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Akash Gupta
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message