mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-24 11:57:59 +01:00
Adjust expected test result, and explain the difference
This commit is contained in:
parent
80a95684d8
commit
077641c803
1 changed files with 18 additions and 2 deletions
|
@ -317,11 +317,27 @@ class AuthenticateTest {
|
|||
Pair(20, listOf(t.aliceFpr, t.bobFpr, t.georgeFpr)),
|
||||
), 240)
|
||||
|
||||
|
||||
// NOTE: original expectation from sequoia-wot:
|
||||
// sp(q3, t.henryFpr, t.henryUid,
|
||||
// listOf(Pair(60, listOf(t.aliceFpr, t.bobFpr, t.georgeFpr, t.henryFpr)),
|
||||
// Pair(60, listOf(t.jennyFpr, t.georgeFpr, t.henryFpr))
|
||||
// ), null)
|
||||
|
||||
// NOTE: Adjusted expectation for pgpainless.
|
||||
// sequoia-wot searches for paths in a very specific way:
|
||||
// backward_propagate() gets called twice in succession, from `authenticate()`, with two different search
|
||||
// modes. The results get merged in a very specific way. In this test, that approach leads to a different
|
||||
// distribution of trust amounts found for the two paths, which also happens to switch the ordering of the
|
||||
// two paths.
|
||||
// Note that the authentication result (the trust amount) remains unchanged, the total flow of 120 remains,
|
||||
// it's just distributed differently between the two available paths. Both results are correct.
|
||||
sp(q3, t.henryFpr, t.henryUid,
|
||||
listOf(Pair(60, listOf(t.aliceFpr, t.bobFpr, t.georgeFpr, t.henryFpr)),
|
||||
Pair(60, listOf(t.jennyFpr, t.georgeFpr, t.henryFpr))
|
||||
listOf(Pair(100, listOf(t.jennyFpr, t.georgeFpr, t.henryFpr)),
|
||||
Pair(20, listOf(t.aliceFpr, t.bobFpr, t.georgeFpr, t.henryFpr))
|
||||
), null)
|
||||
|
||||
|
||||
sp(q3, t.isaacFpr, t.isaacUid, listOf(Pair(60, listOf(t.aliceFpr, t.bobFpr, t.georgeFpr, t.henryFpr, t.isaacFpr))), null)
|
||||
|
||||
sp(q3, t.jennyFpr, t.jennyUid, listOf(Pair(120, listOf(t.jennyFpr))), null)
|
||||
|
|
Loading…
Reference in a new issue