Details
-
Task
-
Status: Accepted
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
3
Description
As part of MESOS-3762, many tests were changed from one TemporaryDirectoryTest to another TemporaryDirectoryTest. One subtle difference is that the name of the temporary directory no longer contains the name of the test. In MESOS-3847, the duplicate TemporaryDirectoryTest was removed.
The original TemporaryDirectoryTest called environment->mkdtemp. We would like the naming, which is valuable for debugging, to be available for a majority of tests. (A majority of tests inherit from TemporaryDirectoryTest in some way.)
Note:
- Any additional directories created via environment->mkdtemp are cleaned up after the test.
- We don't want mesos-specific logic in Stout, like the umount shell command in Environment::TearDown.
- Temp directories created via environment->mkdtemp can be placed in another folder via the TMPDIR environment variable. We want to look at this variable in TemporaryDirectoryTest too.
Proposed change:
Move the temporary directory logic from Environment::mkdtemp to TemporaryDirectoryTest.
Tests that need to change
log_tests.cpp | LogZooKeeperTest | We can change ZooKeeperTest to inherit from TemporaryDirectoryTest to get rid of code duplication |
tests/mesos.cpp | MesosTest::CreateSlaveFlags | MesosTest already inherits from TemporaryDirectoryTest. |
tests/script.hpp | TEST_SCRIPT | This is used for the ExampleTests. We can define a test class that inherits appropriately. |
docker_tests.cpp | * | Already inherits from MesosTest. |
Attachments
Issue Links
- is related to
-
MESOS-3847 Root tests for LinuxFilesystemIsolatorTest are broken
- Resolved
-
MESOS-5044 Temporary directories created by environment->mkdtemp cleanup can be problematic.
- Resolved
-
MESOS-3762 Refactor SSLTest fixture such that MesosTest can use the same helpers.
- Resolved
- relates to
-
MESOS-4653 Unify test case temporary folder name format
- Resolved