fix(thumbnails): keep the video fallback tested and stop the preview worker before cleanup
A video listed without a preview still renders its own element and is released on refresh. Test teardowns and the browser reset stop the automatic preview worker before the temp tree goes, so no preview lands after cleanup (Windows). TESTING.md documents automatic previews.
This commit is contained in:
@@ -423,8 +423,13 @@ class AutoThumbnailMixin:
|
||||
return self._auto_thumbnailer
|
||||
|
||||
def close_auto_thumbnails(self):
|
||||
"""Stop the capture worker (shutdown; safe when it never started)."""
|
||||
thumbnailer = self._auto_thumbnailer
|
||||
"""Stop the capture worker and forget it (shutdown, a test's reset).
|
||||
|
||||
Waits for the batch in hand, so nothing writes into the output tree
|
||||
after it returns; the next use starts a fresh one.
|
||||
"""
|
||||
with AutoThumbnailMixin._auto_thumbnailer_lock:
|
||||
thumbnailer, self._auto_thumbnailer = self._auto_thumbnailer, None
|
||||
if thumbnailer is not None:
|
||||
thumbnailer.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user