diff --git a/lbry/dht/protocol/data_store.py b/lbry/dht/protocol/data_store.py index a5434aaa2..42db91042 100644 --- a/lbry/dht/protocol/data_store.py +++ b/lbry/dht/protocol/data_store.py @@ -1,6 +1,5 @@ import asyncio import typing -from collections import deque from lbry.dht import constants if typing.TYPE_CHECKING: diff --git a/tests/integration/datanetwork/test_file_commands.py b/tests/integration/datanetwork/test_file_commands.py index 753b89a74..541657f98 100644 --- a/tests/integration/datanetwork/test_file_commands.py +++ b/tests/integration/datanetwork/test_file_commands.py @@ -618,22 +618,24 @@ class TestBackgroundDownloaderComponent(CommandTestCase): background_downloader = BackgroundDownloader(self.daemon.conf, self.daemon.storage, self.daemon.blob_manager) await self.clear() + await self.blob_clean() self.assertEqual(0, (await self.status())['disk_space']['total_used_mb']) await background_downloader.download_blobs(content1) await self.assertBlobs(content1) + await self.blob_clean() self.assertEqual(0, (await self.status())['disk_space']['content_blobs_storage_used_mb']) self.assertEqual(32, (await self.status())['disk_space']['seed_blobs_storage_used_mb']) await background_downloader.download_blobs(content2) await self.assertBlobs(content1, content2) + await self.blob_clean() self.assertEqual(0, (await self.status())['disk_space']['content_blobs_storage_used_mb']) self.assertEqual(48, (await self.status())['disk_space']['seed_blobs_storage_used_mb']) await self.clear() await background_downloader.download_blobs(content2) await self.assertBlobs(content2) + await self.blob_clean() self.assertEqual(0, (await self.status())['disk_space']['content_blobs_storage_used_mb']) self.assertEqual(16, (await self.status())['disk_space']['seed_blobs_storage_used_mb']) - self.daemon.conf.network_storage_limit = 100 - self.assertEqual(84, (await self.status())['background_downloader']['available_free_space_mb']) # tests that an attempt to download something that isn't a sd blob will download the single blob and stop blobs = await self.get_blobs_from_sd_blob(self.reflector.blob_manager.get_blob(content1))