• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / crud / 21294069470

23 Jan 2026 04:54PM UTC coverage: 73.505% (-15.0%) from 88.463%
21294069470

Pull #477

github

ita-sammann
test: dump xlogs and snaps for debug
Pull Request #477: test: attempt to mitigate replication bug on cluster start

1 of 2 new or added lines in 1 file covered. (50.0%)

856 existing lines in 47 files now uncovered.

4253 of 5786 relevant lines covered (73.51%)

55.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.55
/crud/common/map_call_cases/base_postprocessor.lua
1
local dev_checks = require('crud.common.dev_checks')
19✔
2

3
local BasePostprocessor = {}
19✔
4

5
--- Create new base postprocessor for map call
6
--
7
-- @function new
8
--
9
-- @return[1] table postprocessor
10
function BasePostprocessor:new(vshard_router)
19✔
11
    local postprocessor = {
38✔
12
        results = {},
38✔
13
        early_exit = false,
14
        errs = nil,
15
        vshard_router = vshard_router,
38✔
16
        storage_info = {},
38✔
17
    }
18

19
    setmetatable(postprocessor, self)
38✔
20
    self.__index = self
38✔
21

22
    return postprocessor
38✔
23
end
24

25
--- Collect data after call
26
--
27
-- @function collect
28
--
29
-- @tparam[opt] table result_info
30
-- Data of function call result
31
-- @tparam[opt] result_info.key
32
-- Key for collecting result
33
-- @tparam[opt] result_info.value
34
-- Value for collecting result by result_info.key
35
--
36
-- @tparam[opt] table err_info
37
-- Data of function call error
38
-- @tparam[opt] function|table err_info.err_wrapper
39
-- Wrapper for error formatting
40
-- @tparam[opt] table|cdata err_info.err
41
-- Err of function call
42
-- @tparam[opt] table err_info.wrapper_args
43
-- Additional args for error wrapper
44
--
45
-- @return[1] boolean early_exit
46
function BasePostprocessor:collect(result_info, err_info)
19✔
47
    dev_checks('table', {
48✔
48
        key = '?',
49
        value = '?',
50
    },{
24✔
51
        err_wrapper = 'function|table',
52
        err = '?table|cdata',
53
        wrapper_args = '?table',
54
    })
55

56
    if result_info.value ~= nil and type(result_info.value[1]) == 'table' then
24✔
57
        if result_info.value[1].storage_info ~= nil then
8✔
UNCOV
58
            self.storage_info[result_info.key] = {
×
UNCOV
59
                replica_schema_version = result_info.value[1].storage_info.replica_schema_version
×
60
            }
61
        end
62
    end
63

64
    local err = err_info.err
24✔
65
    if err == nil and result_info.value[1] == nil then
24✔
66
        err = result_info.value[2]
6✔
67
    end
68

69
    if err ~= nil then
24✔
70
        self.results = nil
2✔
71
        self.errs = err_info.err_wrapper(self.vshard_router, err, unpack(err_info.wrapper_args))
4✔
72
        self.early_exit = true
2✔
73

74
        return self.early_exit
2✔
75
    end
76

77
    if self.early_exit ~= true then
22✔
78
        self.results[result_info.key] = result_info.value
22✔
79
    end
80

81
    return self.early_exit
22✔
82
end
83

84
--- Get collected data
85
--
86
-- @function get
87
--
88
-- @return[1] table results
89
-- @return[2] table errs
90
-- @return[3] table storage_info
91
function BasePostprocessor:get()
19✔
92
    return self.results, self.errs, self.storage_info
38✔
93
end
94

95
return BasePostprocessor
19✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc