Skip to content

Commit cfd57af

Browse files
authored
style(kafka): apply stricter linting (#4564)
1 parent 4f6cc3c commit cfd57af

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/kafka/tests/unit/consumer.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { setTimeout } from 'node:timers/promises';
12
import type { Context } from 'aws-lambda';
23
import { describe, expect, it } from 'vitest';
34
import { z } from 'zod/v4';
@@ -145,6 +146,7 @@ describe('Kafka consumer', () => {
145146
for (const record of event.records) {
146147
try {
147148
results.push(record.value);
149+
await setTimeout(1); // simulate some processing time
148150
} catch (error) {
149151
return error;
150152
}
@@ -247,6 +249,7 @@ describe('Kafka consumer', () => {
247249
for (const record of event.records) {
248250
try {
249251
const { value, key } = record;
252+
await setTimeout(1); // simulate some processing time
250253
results.push([value, key]);
251254
} catch (error) {
252255
return error;
@@ -444,6 +447,7 @@ describe('Kafka consumer', () => {
444447
try {
445448
const { value } = record;
446449
results.push(value);
450+
await setTimeout(1); // simulate some processing time
447451
} catch (error) {
448452
results.push(error);
449453
}
@@ -480,6 +484,7 @@ describe('Kafka consumer', () => {
480484
try {
481485
const { value } = record;
482486
results.push(value);
487+
await setTimeout(1); // simulate some processing time
483488
} catch (error) {
484489
results.push(error);
485490
}
@@ -531,6 +536,7 @@ describe('Kafka consumer', () => {
531536
try {
532537
const { value } = record;
533538
results.push(value);
539+
await setTimeout(1); // simulate some processing time
534540
} catch (error) {
535541
results.push(error);
536542
}

packages/kafka/tests/unit/deserializer.avro.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('Avro Deserializer: ', () => {
2121
expect(await deserialize(message, schema)).toEqual(expected);
2222
});
2323

24-
it('throws when avro deserialiser fails', async () => {
24+
it('throws when avro deserialiser fails', () => {
2525
// Prepare
2626
const message = '0g8MTGFwdG9wUrgehes/j0A=';
2727
const schema = `{
@@ -39,7 +39,7 @@ describe('Avro Deserializer: ', () => {
3939
);
4040
});
4141

42-
it('throws when avro deserialiser has not matching schema', async () => {
42+
it('throws when avro deserialiser has not matching schema', () => {
4343
// Prepare
4444
const message = '0g8MTGFwdG9wUrgehes/j0A=';
4545
const schema = `{

0 commit comments

Comments
 (0)