Skip to content

Commit e367100

Browse files
committed
updated test case 7
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
1 parent cd5cb26 commit e367100

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

docs/test-plan/persistence/files-recent-persistence-e2e-test-plan.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -310,31 +310,38 @@ N/A
310310
#### Scenario Description
311311

312312
`Files Recent Persistence` will persist a block after it has been received and
313-
verified.
313+
verified. If the received and verified block's resolved path already exists,
314+
no matter what the reason is, it must be overwritten with the received block's
315+
data.
314316

315317
#### Expected Behaviour
316318

317-
It is expected that a regular file is written at the properly resolved location.
318-
It is expected that this file can be overwritten.
319+
It is expected that when the Block-Node receives the next in sequence block and
320+
then verifies it, the `Files Recent Persistence` will attempt to persist it at
321+
the resolved path. If a file already exists at that path, it will be truncated
322+
and overwritten with the received data. An Acknowledged block is deemed final
323+
and immutable (especially when the next block is received, verified,
324+
persisted and acknowledged), but that is outside the scope of the
325+
`Files Recent Persistence`. As long as data comes in to the
326+
`Files Recent Persistence` it will be persisted at the resolved path.
319327

320328
#### Requirements
321329

322-
A publisher that is able to stream to the Block-Node under test. A client that
323-
can call the public APIs to read the block (i.e. `getBlock`). Client receives
324-
not found if initially attempts to read the block under test (expected).
330+
A publisher that is able to stream to the Block-Node under test. A regular file
331+
exists at the resolved location of the block under test with some arbitrary test
332+
data. A client that can call the public API to read the block (i.e. `getBlock`).
325333

326334
#### Input
327335

328336
Valid block `0000000000001234567` is streamed as items, waiting for
329-
Acknowledgement (ensure it is persisted). Then it is streamed again with
330-
different binary data. The Block-Node under test must be able to accept the
331-
second stream and overwrite the existing file.
337+
Acknowledgement (ensure it is persisted).
332338

333339
#### Output
334340

335341
Regular Readable File:
336-
`/blocks/000/000/000/000/123/4/0000000000001234567.blk.zstd` exists and it's
337-
binary content is the same as the second time it was streamed.
342+
`/blocks/000/000/000/000/123/4/0000000000001234567.blk.zstd` exists it's
343+
binary content is the same as the binary data received via the stream and a
344+
client is able to read it through the public API (i.e. `getBlock`).
338345

339346
#### Other
340347

0 commit comments

Comments
 (0)