dont set head blob to announce on save
This commit is contained in:
parent
f271511484
commit
154c41bd8d
2 changed files with 3 additions and 3 deletions
|
@ -187,8 +187,8 @@ def store_stream(transaction: sqlite3.Connection, sd_blob: 'BlobFile', descripto
|
||||||
).fetchall()
|
).fetchall()
|
||||||
# ensure should_announce is set regardless if insert was ignored
|
# ensure should_announce is set regardless if insert was ignored
|
||||||
transaction.execute(
|
transaction.execute(
|
||||||
"update blob set should_announce=1 where blob_hash in (?, ?)",
|
"update blob set should_announce=1 where blob_hash in (?)",
|
||||||
(sd_blob.blob_hash, descriptor.blobs[0].blob_hash,)
|
(sd_blob.blob_hash,)
|
||||||
).fetchall()
|
).fetchall()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ class TestReflector(AsyncioTestCase):
|
||||||
async def test_announces(self):
|
async def test_announces(self):
|
||||||
to_announce = await self.storage.get_blobs_to_announce()
|
to_announce = await self.storage.get_blobs_to_announce()
|
||||||
self.assertIn(self.stream.sd_hash, to_announce, "sd blob not set to announce")
|
self.assertIn(self.stream.sd_hash, to_announce, "sd blob not set to announce")
|
||||||
self.assertIn(self.stream.descriptor.blobs[0].blob_hash, to_announce, "head blob not set to announce")
|
self.assertNotIn(self.stream.descriptor.blobs[0].blob_hash, to_announce, "head blob set to announce")
|
||||||
|
|
||||||
async def test_result_from_disconnect_mid_sd_transfer(self):
|
async def test_result_from_disconnect_mid_sd_transfer(self):
|
||||||
stop = asyncio.Event()
|
stop = asyncio.Event()
|
||||||
|
|
Loading…
Add table
Reference in a new issue