summaryrefslogtreecommitdiff
path: root/contrib/hooks/update-paranoid
diff options
context:
space:
mode:
authorLibravatar Johan Herland <johan@herland.net>2020-02-03 22:04:44 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-04 12:20:27 -0800
commite1c52539510131b498087e177fe93d0bac744a5b (patch)
tree958ba24017142e05c71c2c76ce534f3f76e35843 /contrib/hooks/update-paranoid
parentmsvc: accommodate for vcpkg's upgrade to OpenSSL v1.1.x (diff)
downloadtgif-e1c52539510131b498087e177fe93d0bac744a5b.tar.xz
t3305: check notes fanout more carefully and robustly
In short, before this patch, this test script: - creates many notes - verifies that all notes in the notes tree has a fanout of 1 - removes most notes - verifies that the notes in the notes tree now has a fanout of 0 The fanout verification only happened twice: after creating all the notes, and after removing most of them. This patch strengthens the test by checking the fanout after _each_ added/removed note: We assert that the switch from fanout 0 -> 1 happens exactly once while adding notes (and that the switch pervades the entire notes tree). Likewise, we assert that the switch from fanout 1 -> 0 happens exactly once while removing notes. Additionally, we decrease the number of notes left after removal, from 50 to 15 notes, in order to ensure that fanout 1 -> 0 transition keeps happening regardless of external factors[1]. [1]: Currently (with the SHA1 hash function and the deterministic object ids of the test environment) the fanout heuristic in the notes code happens to switch from 0 -> 1 at 109 notes, and from 1 -> 0 at 59 notes. However, changing the hash function or other external factors will vary these numbers, and the latter may - in theory - go as low as 15. For more details, please see the discussion at https://public-inbox.org/git/20200125230035.136348-4-sandals@crustytoothpaste.net/ Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de> Cc: Brian M. Carlson <sandals@crustytoothpaste.net> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/hooks/update-paranoid')
0 files changed, 0 insertions, 0 deletions