test(library): F4 正例按基线计数标记转发
写入精确 marker 本身会经过 wire;断言应比较确认前后的增量,而不是绝对值。
This commit is contained in:
@@ -165,6 +165,8 @@ func TestDS01BindingConflictRejectedInEveryState(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
// 从这里开始只允许确认,不允许任何新的 marker create。
|
||||||
|
beforeDispatch := wire.dispatch
|
||||||
conflict := func(state string) *ds01StubGate {
|
conflict := func(state string) *ds01StubGate {
|
||||||
return &ds01StubGate{inspectFound: true, inspectStatus: libraryrelease.RestoreDispatchStatus{
|
return &ds01StubGate{inspectFound: true, inspectStatus: libraryrelease.RestoreDispatchStatus{
|
||||||
State: state, Held: true, BindingConflict: true, Reason: "binding differs"},
|
State: state, Held: true, BindingConflict: true, Reason: "binding differs"},
|
||||||
@@ -220,8 +222,8 @@ func TestDS01BindingConflictRejectedInEveryState(t *testing.T) {
|
|||||||
if okGate.confirmed != 1 {
|
if okGate.confirmed != 1 {
|
||||||
t.Fatalf("legitimate marker confirmation count = %d", okGate.confirmed)
|
t.Fatalf("legitimate marker confirmation count = %d", okGate.confirmed)
|
||||||
}
|
}
|
||||||
if wire.dispatch != 0 {
|
if wire.dispatch != beforeDispatch {
|
||||||
t.Fatalf("confirmation path forwarded %d marker writes", wire.dispatch)
|
t.Fatalf("confirmation path forwarded %d marker writes", wire.dispatch-beforeDispatch)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user