(source, target, since)
| 1836 | } |
| 1837 | |
| 1838 | function replicateExpectingSuccess(source, target, since) { |
| 1839 | if (!source) source = SourceModel; |
| 1840 | if (!target) target = TargetModel; |
| 1841 | |
| 1842 | return function doReplicate(next) { |
| 1843 | replicate(source, target, since, function(err, conflicts, cps) { |
| 1844 | if (err) return next(err); |
| 1845 | |
| 1846 | if (conflicts.length) { |
| 1847 | return next(new Error('Unexpected conflicts\n' + |
| 1848 | conflicts.map(JSON.stringify).join('\n'))); |
| 1849 | } |
| 1850 | |
| 1851 | next(); |
| 1852 | }); |
| 1853 | }; |
| 1854 | } |
| 1855 | |
| 1856 | function setupRaceConditionInReplication(fn) { |
| 1857 | const bulkUpdate = TargetModel.bulkUpdate; |
no test coverage detected
searching dependent graphs…