mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-11-10 21:21:19 +08:00
16 lines
501 B
JavaScript
16 lines
501 B
JavaScript
const { describe, test } = require("node:test");
|
|
const assert = require("node:assert");
|
|
const { kafkaProducerAsync } = require("../../../server/util");
|
|
|
|
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
|
|
);
|
|
});
|
|
});
|