Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Problem
Several tests download archives for setting up systems, like Kafka of Elasticsearch. We currently do not cache downloads in any way, resulting in less stable tests (as mirrors aren't always available) and overall increased test duration (since the downloads at times are quite slow). The duration issue becomes especially apparent when running tests in a loop for debugging or release-testing purposes.
Finally, it also puts unnecessary strain on the download mirrors.
Proposal
Add a DownloadCache interface with a single Path getOrDownload(String url, Path targetDir) method.
Access to and loading of implementations are handled like resources (see above).
The caching behavior is implementation-dependent.
A reasonable implementation should allow files may be cached in a user-provided directory, with an optional time-to-live for long-term setups.
Attachments
Issue Links
- supercedes
-
FLINK-13606 PrometheusReporterEndToEndITCase.testReporter unstable on Travis
- Closed