Skip to content

Commit a5d2213

Browse files
fixup test GC
1 parent 409b64a commit a5d2213

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

extensions/gc/GarbageCollectorProducer.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,16 @@ class GarbageCollectorProducer {
3030
requiredAcks: this._kafkaConfig.requiredAcks,
3131
topic: this._topic,
3232
});
33-
producer.once('error', () => {});
33+
producer.once('error', err => {
34+
this._log.error('error from GarbageCollectorProducer backbeat producer', {
35+
topic: this._topic,
36+
error: err,
37+
errmsg: err.toString(),
38+
});
39+
cb(err);
40+
});
3441
producer.once('ready', () => {
42+
this._log.info('GarbageCollectorProducer backbeat producer ready');
3543
producer.removeAllListeners('error');
3644
producer.on('error', err =>
3745
this._log.error('error from backbeat producer', {

lib/BackbeatProducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const {
1515
KAFKA_PRODUCER_DEFAULT_COMPRESSION_TYPE,
1616
KAFKA_PRODUCER_DEFAULT_REQUIRED_ACKS,
1717
} = require('./config.joi');
18-
const FLUSH_TIMEOUT = 5000;
18+
const FLUSH_TIMEOUT = 10000;
1919

2020

2121
class BackbeatProducer extends EventEmitter {

tests/functional/replication/queueProcessor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const ReplicationStatusProcessor = require('../../../extensions/replication' +
2323

2424
/* eslint-disable max-len */
2525

26+
werelogs.configure({ level: 'trace' });
2627

2728
function getMD5(body) {
2829
return crypto.createHash('md5').update(body).digest('hex');
@@ -1566,7 +1567,7 @@ describe('GC should be created if config is provided', () => {
15661567
});
15671568

15681569
it('should not create a GC if config is not provided', function (done) {
1569-
this.timeout(60000);
1570+
this.timeout(120000);
15701571
const replicationStatusProcessor = new ReplicationStatusProcessor(
15711572
{ hosts: 'localhost:9092' },
15721573
{ auth: { type: 'role',

0 commit comments

Comments
 (0)