From dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 18:28:20 +0200 Subject: Adding upstream version 8.2402.0. Signed-off-by: Daniel Baumann --- tests/imkafka-hang-on-no-kafka.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 tests/imkafka-hang-on-no-kafka.sh (limited to 'tests/imkafka-hang-on-no-kafka.sh') diff --git a/tests/imkafka-hang-on-no-kafka.sh b/tests/imkafka-hang-on-no-kafka.sh new file mode 100755 index 0000000..7e7d289 --- /dev/null +++ b/tests/imkafka-hang-on-no-kafka.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# added 2018-10-22 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +. $srcdir/diag.sh init +export RSTB_GLOBAL_INPUT_SHUTDOWN_TIMEOUT=5000 # 5sec +generate_conf +add_conf ' +main_queue(queue.type="direct") + +module(load="../plugins/imkafka/.libs/imkafka") + +input( type="imkafka" + ruleset="kafka" + topic="irrelevant" + broker="localhost:29092" + consumergroup="default" + confParam=[ "socket.timeout.ms=5000", + "socket.keepalive.enable=true" ] + ) + +template(name="outfmt" type="string" string="%msg:F,58:2%\n") + +ruleset(name="kafka") { + action( type="omfile" file=`echo $RSYSLOG_OUT_LOG` template="outfmt" ) +} + +action( type="omfile" file="'$RSYSLOG_OUT_LOG.syslog.log'" template="outfmt" ) +' + +export RSTB_DAEMONIZE="YES" +startup +shutdown_when_empty +wait_shutdown +# the main point is to see if we can terminate, so no further checks down here! +exit_test -- cgit v1.2.3