Skip to content

Commit

Permalink
Extend bucket notification timeout and map to the test timeout
Browse files Browse the repository at this point in the history
Issue: ZENKO-4806
  • Loading branch information
williamlardier committed Sep 2, 2024
1 parent 2911d08 commit a2ec22a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/ctst/steps/notifications.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Then, Given, When, After } from '@cucumber/cucumber';
import { strict as assert } from 'assert';
import { S3, Utils, KafkaHelper, AWSVersionObject, NotificationDestination } from 'cli-testing';
import { S3, Utils, KafkaHelper, AWSVersionObject, NotificationDestination, Constants } from 'cli-testing';
import { Message } from 'node-rdkafka';
import { cleanS3Bucket } from 'common/common';
import Zenko from 'world/Zenko';

const KAFKA_TESTS_TIMEOUT = Number(process.env.KAFKA_TESTS_TIMEOUT) || 60000;
const KAFKA_TESTS_TIMEOUT = Number(process.env.KAFKA_TESTS_TIMEOUT) || Constants.DEFAULT_TIMEOUT * 1.5;

const allNotificationTypes = [
's3:ObjectCreated:Put',
Expand Down Expand Up @@ -308,6 +308,7 @@ Then('notifications should be enabled for {string} event in destination {int}',
});

Then('i should {string} a notification for {string} event in destination {int}',
{ timeout: Constants.DEFAULT_TIMEOUT * 2 },
async function (this: Zenko, receive: string, notificationType: string, destination: number) {

const receivedNotification = await KafkaHelper.consumeTopicUntilCondition(
Expand Down

0 comments on commit a2ec22a

Please sign in to comment.