@@ -180,28 +180,32 @@ func TestAdvanceView(t *testing.T) {
180180 {name : "signers=4/Simple___/__/TC/AC" , tr : S , qc : F , tc : T , ac : T , firstSignerIdx : 0 , wantView : 2 },
181181 {name : "signers=4/Simple___/QC/__/__" , tr : S , qc : T , tc : F , ac : F , firstSignerIdx : 0 , wantView : 2 },
182182 {name : "signers=4/Simple___/QC/__/AC" , tr : S , qc : T , tc : F , ac : T , firstSignerIdx : 0 , wantView : 2 },
183+ {name : "signers=4/Simple___/QC/TC/__" , tr : S , qc : T , tc : T , ac : F , firstSignerIdx : 0 , wantView : 2 },
183184 {name : "signers=4/Simple___/QC/TC/AC" , tr : S , qc : T , tc : T , ac : T , firstSignerIdx : 0 , wantView : 2 },
184185 {name : "signers=4/Aggregate/__/__/__" , tr : A , qc : F , tc : F , ac : F , firstSignerIdx : 0 , wantView : 1 }, // empty syncInfo, should not advance view
185186 {name : "signers=4/Aggregate/__/__/AC" , tr : A , qc : F , tc : F , ac : T , firstSignerIdx : 0 , wantView : 2 },
186187 {name : "signers=4/Aggregate/__/TC/__" , tr : A , qc : F , tc : T , ac : F , firstSignerIdx : 0 , wantView : 2 },
187188 {name : "signers=4/Aggregate/__/TC/AC" , tr : A , qc : F , tc : T , ac : T , firstSignerIdx : 0 , wantView : 2 },
188189 {name : "signers=4/Aggregate/QC/__/__" , tr : A , qc : T , tc : F , ac : F , firstSignerIdx : 0 , wantView : 1 }, // aggregate timeout rule ignores quorum cert, will not advance view
189190 {name : "signers=4/Aggregate/QC/__/AC" , tr : A , qc : T , tc : F , ac : T , firstSignerIdx : 0 , wantView : 2 },
191+ {name : "signers=4/Aggregate/QC/TC/__" , tr : A , qc : T , tc : T , ac : F , firstSignerIdx : 0 , wantView : 2 },
190192 {name : "signers=4/Aggregate/QC/TC/AC" , tr : A , qc : T , tc : T , ac : T , firstSignerIdx : 0 , wantView : 2 },
191- // three signers; quorum reacted , advance view
193+ // three signers; quorum reached , advance view
192194 {name : "signers=3/Simple___/__/__/__" , tr : S , qc : F , tc : F , ac : F , firstSignerIdx : 1 , wantView : 1 }, // empty syncInfo, should not advance view
193195 {name : "signers=3/Simple___/__/__/AC" , tr : S , qc : F , tc : F , ac : T , firstSignerIdx : 1 , wantView : 1 }, // simple timeout rule ignores aggregate timeout cert, will not advance view
194196 {name : "signers=3/Simple___/__/TC/__" , tr : S , qc : F , tc : T , ac : F , firstSignerIdx : 1 , wantView : 2 },
195197 {name : "signers=3/Simple___/__/TC/AC" , tr : S , qc : F , tc : T , ac : T , firstSignerIdx : 1 , wantView : 2 },
196198 {name : "signers=3/Simple___/QC/__/__" , tr : S , qc : T , tc : F , ac : F , firstSignerIdx : 1 , wantView : 2 },
197199 {name : "signers=3/Simple___/QC/__/AC" , tr : S , qc : T , tc : F , ac : T , firstSignerIdx : 1 , wantView : 2 },
200+ {name : "signers=3/Simple___/QC/TC/__" , tr : S , qc : T , tc : T , ac : F , firstSignerIdx : 1 , wantView : 2 },
198201 {name : "signers=3/Simple___/QC/TC/AC" , tr : S , qc : T , tc : T , ac : T , firstSignerIdx : 1 , wantView : 2 },
199202 {name : "signers=3/Aggregate/__/__/__" , tr : A , qc : F , tc : F , ac : F , firstSignerIdx : 1 , wantView : 1 }, // empty syncInfo, should not advance view
200203 {name : "signers=3/Aggregate/__/__/AC" , tr : A , qc : F , tc : F , ac : T , firstSignerIdx : 1 , wantView : 2 },
201204 {name : "signers=3/Aggregate/__/TC/__" , tr : A , qc : F , tc : T , ac : F , firstSignerIdx : 1 , wantView : 2 },
202205 {name : "signers=3/Aggregate/__/TC/AC" , tr : A , qc : F , tc : T , ac : T , firstSignerIdx : 1 , wantView : 2 },
203206 {name : "signers=3/Aggregate/QC/__/__" , tr : A , qc : T , tc : F , ac : F , firstSignerIdx : 1 , wantView : 1 }, // aggregate timeout rule ignores quorum cert, will not advance view
204207 {name : "signers=3/Aggregate/QC/__/AC" , tr : A , qc : T , tc : F , ac : T , firstSignerIdx : 1 , wantView : 2 },
208+ {name : "signers=3/Aggregate/QC/TC/__" , tr : A , qc : T , tc : T , ac : F , firstSignerIdx : 1 , wantView : 2 },
205209 {name : "signers=3/Aggregate/QC/TC/AC" , tr : A , qc : T , tc : T , ac : T , firstSignerIdx : 1 , wantView : 2 },
206210 // only two signers; no quorum reached, should not advance view
207211 {name : "signers=2/Simple___/__/__/__" , tr : S , qc : F , tc : F , ac : F , firstSignerIdx : 2 , wantView : 1 }, // empty syncInfo, should not advance view
@@ -210,13 +214,15 @@ func TestAdvanceView(t *testing.T) {
210214 {name : "signers=2/Simple___/__/TC/AC" , tr : S , qc : F , tc : T , ac : T , firstSignerIdx : 2 , wantView : 1 },
211215 {name : "signers=2/Simple___/QC/__/__" , tr : S , qc : T , tc : F , ac : F , firstSignerIdx : 2 , wantView : 1 },
212216 {name : "signers=2/Simple___/QC/__/AC" , tr : S , qc : T , tc : F , ac : T , firstSignerIdx : 2 , wantView : 1 },
217+ {name : "signers=2/Simple___/QC/TC/__" , tr : S , qc : T , tc : T , ac : F , firstSignerIdx : 2 , wantView : 1 },
213218 {name : "signers=2/Simple___/QC/TC/AC" , tr : S , qc : T , tc : T , ac : T , firstSignerIdx : 2 , wantView : 1 },
214219 {name : "signers=2/Aggregate/__/__/__" , tr : A , qc : F , tc : F , ac : F , firstSignerIdx : 2 , wantView : 1 }, // empty syncInfo, should not advance view
215220 {name : "signers=2/Aggregate/__/__/AC" , tr : A , qc : F , tc : F , ac : T , firstSignerIdx : 2 , wantView : 1 },
216221 {name : "signers=2/Aggregate/__/TC/__" , tr : A , qc : F , tc : T , ac : F , firstSignerIdx : 2 , wantView : 1 },
217222 {name : "signers=2/Aggregate/__/TC/AC" , tr : A , qc : F , tc : T , ac : T , firstSignerIdx : 2 , wantView : 1 },
218223 {name : "signers=2/Aggregate/QC/__/__" , tr : A , qc : T , tc : F , ac : F , firstSignerIdx : 2 , wantView : 1 },
219224 {name : "signers=2/Aggregate/QC/__/AC" , tr : A , qc : T , tc : F , ac : T , firstSignerIdx : 2 , wantView : 1 },
225+ {name : "signers=2/Aggregate/QC/TC/__" , tr : A , qc : T , tc : T , ac : F , firstSignerIdx : 2 , wantView : 1 },
220226 {name : "signers=2/Aggregate/QC/TC/AC" , tr : A , qc : T , tc : T , ac : T , firstSignerIdx : 2 , wantView : 1 },
221227 }
222228 for _ , tt := range tests {
0 commit comments