From f26b1e0e4b1a9873720dff87c68ba381674664a0 Mon Sep 17 00:00:00 2001 From: Bobby Iliev Date: Thu, 23 Mar 2023 22:09:37 +0200 Subject: [PATCH] Fix failing tests --- .github/workflows/integration.yaml | 6 +++--- datagen.ts | 2 +- src/kafka/cleanKafka.ts | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index c0640c4..89f858a 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -36,16 +36,16 @@ jobs: run: docker exec datagen datagen -s /tests/schema.json -f avro -n 3 --record-size 100 -d -w 100 -p json - name: Produce to Kafka from Avro Schema in Avro Format - run: docker exec datagen datagen -s /tests/schema.avsc -f avro -n 3 --record-size 100 -d -w 100 -p sql + run: docker exec datagen datagen -s /tests/schema.avsc -f avro -n 3 --record-size 100 -d -w 100 -p avro - name: Clean Kafka topic run: docker exec datagen datagen -s /tests/schema2.sql -f json -d --clean - name: Clean Kafka topic with prefix - run: docker exec datagen datagen -s /tests/schema2.sql -f json -d --clean --prefix test + run: docker exec datagen datagen -s /tests/schema2.sql -f json -d --clean --prefix json - name: Clean Kafka topic and schema registry - run: docker exec datagen datagen -s /tests/schema.avsc -f avro -d --clean + run: docker exec datagen datagen -s /tests/schema.avsc -f avro -d --clean --prefix avro - name: Docker Compose Down run: docker compose down -v diff --git a/datagen.ts b/datagen.ts index 6254ad3..9901975 100755 --- a/datagen.ts +++ b/datagen.ts @@ -49,7 +49,7 @@ if (!fs.existsSync(options.schema)) { name: `Schema file ${options.schema} does not exist!`, msg: `` }); - process.exit(); + process.exit(1); } global.debug = options.debug; diff --git a/src/kafka/cleanKafka.ts b/src/kafka/cleanKafka.ts index 95e5d56..2e8b6f1 100644 --- a/src/kafka/cleanKafka.ts +++ b/src/kafka/cleanKafka.ts @@ -25,6 +25,7 @@ async function deleteSchemaSubjects(topics: any): Promise { .catch((error) => { console.error(error.response.status); console.error(error.response.data.message); + process.exit(1); }); } }