Skip to content

Commit e5268a5

Browse files
add random database naming
1 parent b03e5f3 commit e5268a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

deku-p/src/core/block_storage/tests/block_storage_tests.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ let block ~default_block_size =
1919
Producer.produce ~identity ~default_block_size ~above ~withdrawal_handles_hash
2020
producer
2121

22-
let uri = Uri.of_string "sqlite3:/tmp/database.db"
22+
let file_hash =
23+
let randn = Stdlib.Random.int 230 in
24+
Deku_crypto.BLAKE2b.hash (Int.to_string randn) |> BLAKE2b.to_hex
25+
26+
let uri = Uri.of_string (Format.sprintf "sqlite3:/tmp/%s.db" file_hash)
2327

2428
let make_block_storage env sw =
2529
let domains = Eio.Stdenv.domain_mgr env in

0 commit comments

Comments
 (0)