diff --git a/testHelpers/index.js b/testHelpers/index.js index 804f20304..b903d9062 100644 --- a/testHelpers/index.js +++ b/testHelpers/index.js @@ -165,12 +165,16 @@ const addPartitions = async ({ topic, partitions }) => { }) } -const testIfKafka011 = (description, callback) => { +const testIfKafka011 = (description, callback, testFn = test) => { return process.env.KAFKA_VERSION === '0.11' - ? test(description, callback) + ? testFn(description, callback) : test.skip(description, callback) } +testIfKafka011.only = (description, callback) => { + return testIfKafka011(description, callback, test.only) +} + const unsupportedVersionResponse = () => Buffer.from({ type: 'Buffer', data: [0, 35, 0, 0, 0, 0] }) module.exports = {