Skip to content

Commit

Permalink
Increase frequency and checks of kafkacleaner
Browse files Browse the repository at this point in the history
Issue: ZENKO-4806
  • Loading branch information
williamlardier committed Sep 3, 2024
1 parent e22a9de commit 0125893
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/ctst/common/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,15 @@ Then('i {string} be able to add user metadata to object {string}',
}
});

const kafkaCleanerTimeout = 1800000; // 30min
const kafkaCleanerTimeout = 900000; // 15min
Then('kafka consumed messages should not take too much place on disk', { timeout: kafkaCleanerTimeout },
async function (this: Zenko) {
const kfkcIntervalSeconds = parseInt(this.parameters.KafkaCleanerInterval);
const checkInterval = kfkcIntervalSeconds * (1000 + 5000);
const checkInterval = kfkcIntervalSeconds * 1000 + 5000;

const timeoutID = setTimeout(() => {
assert.fail('Kafka cleaner did not clean the topics within the expected time');
}, Math.min(kafkaCleanerTimeout, checkInterval * 10)); // Timeout after 10 Kafka cleaner intervals
}, Math.min(kafkaCleanerTimeout, checkInterval * 25)); // Timeout after 25 Kafka cleaner intervals

try {
const ignoredTopics = ['dead-letter'];
Expand Down

0 comments on commit 0125893

Please sign in to comment.