From aae0bb6c2a07733fc02b3e56809835073072bec5 Mon Sep 17 00:00:00 2001 From: Vladimir Davydov <vdavydov.dev@gmail.com> Date: Thu, 7 Feb 2019 13:31:05 +0300 Subject: [PATCH] Fix tests failing after the last commit Follow-up dd30970ed1e4 ("replication: log replica_id in addition to lsn on conflict"). --- test/unit/xrow.cc | 4 +++- test/xlog/panic_on_broken_lsn.result | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/unit/xrow.cc b/test/unit/xrow.cc index 165a543cff..022d1f9989 100644 --- a/test/unit/xrow.cc +++ b/test/unit/xrow.cc @@ -244,6 +244,7 @@ test_request_str() { plan(1); struct xrow_header header; + header.replica_id = 5; header.lsn = 100; struct request request; request.header = &header; @@ -263,7 +264,8 @@ test_request_str() request.ops = pos; pos = mp_encode_array(pos, 1); pos = mp_encode_uint(pos, 400); - is(strcmp("{type: 'SELECT', lsn: 100, space_id: 512, index_id: 1, "\ + is(strcmp("{type: 'SELECT', replica_id: 5, lsn: 100, " + "space_id: 512, index_id: 1, " "key: [200], tuple: [300], ops: [400]}", request_str(&request)), 0, "request_str"); diff --git a/test/xlog/panic_on_broken_lsn.result b/test/xlog/panic_on_broken_lsn.result index b8583defd9..7a1375b2be 100644 --- a/test/xlog/panic_on_broken_lsn.result +++ b/test/xlog/panic_on_broken_lsn.result @@ -94,7 +94,7 @@ logpath = fio.pathjoin(fio.cwd(), 'panic.log') grep_file_tail(logpath, 256, "LSN for 1 is used twice or COMMIT order is broken: confirmed: 1, new: 1, req: {.*}") --- - 'LSN for 1 is used twice or COMMIT order is broken: confirmed: 1, new: 1, req: {type: - ''REPLACE'', lsn: 1, space_id: 272, index_id: 0, tuple: ["t0", "v1"]}' + ''REPLACE'', replica_id: 1, lsn: 1, space_id: 272, index_id: 0, tuple: ["t0", "v1"]}' ... test_run:cmd('cleanup server panic') --- @@ -162,7 +162,8 @@ test_run:cmd("push filter 'confirmed: "..lsn..", new: "..lsn.."' to '<lsn>'") grep_file_tail(logpath, 256, "(LSN for 1 is used twice or COMMIT order is broken: confirmed: "..lsn..", new: "..lsn.."), req: ({.*})") --- - 'LSN for 1 is used twice or COMMIT order is broken: <lsn>' -- '{type: ''INSERT'', lsn: <lsn>, space_id: <space_id>, index_id: 0, tuple: [2, "v1"]}' +- '{type: ''INSERT'', replica_id: 1, lsn: <lsn>, space_id: <space_id>, index_id: 0, tuple: [2, + "v1"]}' ... test_run:cmd("clear filter") --- -- GitLab