Fix flaky test
Sometimes we can observe following error (only with github action):
• [FAILED] [0.192 seconds]
Downloader
/home/runner/work/blocky/blocky/lists/downloader_test.go:21
Download of a file
/home/runner/work/blocky/blocky/lists/downloader_test.go:73
when DNS resolution of passed URL fails
/home/runner/work/blocky/blocky/lists/downloader_test.go:196
[It] Should perform a retry until max retry attempt count is reached and return DNSError
/home/runner/work/blocky/blocky/lists/downloader_test.go:203
Expected
<bool>: false
to be true
In [It] at: /home/runner/work/blocky/blocky/lists/downloader_test.go:207
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Got way better but I think this issue should stay open as it still gets flaky from time to time
This may not be the test's problem. Instead it may be an indicator to a problem of the downloader used by blocky.
I recently switched to the following setup: (1) a script to download lists via wget (2) a static file server running locally to expose these lists to blocky. (3) blocky.
Comparing to the blocky only setup: Blocky only: total time spent on downloading and parsing is about 15 minutes. File downloading randomly failed as well.
With the local static file server: downloading: about 30 seconds. blocky parsing: about 5 minutes.
You can see that using wget not only is much faster than letting blocky download the files, but also fixes the random failures.