mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-06-23 04:10:14 +00:00
8e27fd1925
Co-authored-by: joaofilipesilva <joao.silva@clearops.com>
16 lines
508 B
JavaScript
16 lines
508 B
JavaScript
const { describe, test } = require("node:test");
|
|
const assert = require("node:assert");
|
|
const { kafkaProducerAsync } = require("../../../server/util-server");
|
|
|
|
describe("Kafka Producer", () => {
|
|
test("rejects when broker is not reachable", async () => {
|
|
await assert.rejects(
|
|
kafkaProducerAsync(["localhost:19092"], "test-topic", "test-message", {
|
|
interval: 5,
|
|
connectionTimeout: 1,
|
|
}),
|
|
/.*/ // any error
|
|
);
|
|
});
|
|
});
|