|
@@ -191,6 +191,10 @@ func TestLogMaybeAppend(t *testing.T) {
|
|
|
lastterm, lastindex, lastindex + 1, nil,
|
|
lastterm, lastindex, lastindex + 1, nil,
|
|
|
lastindex, true, lastindex, // do not increase commit higher than lastnewi
|
|
lastindex, true, lastindex, // do not increase commit higher than lastnewi
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ lastterm, lastindex, lastindex - 1, nil,
|
|
|
|
|
+ lastindex, true, lastindex - 1, // commit up to the commit in the message
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
lastterm, lastindex, lastindex, []pb.Entry{{Term: 4}},
|
|
lastterm, lastindex, lastindex, []pb.Entry{{Term: 4}},
|
|
|
lastindex + 1, true, lastindex,
|
|
lastindex + 1, true, lastindex,
|