From 127c1c0013c3adf91afbd124c01fe349bfffc265 Mon Sep 17 00:00:00 2001 From: l0r1s <contact@lorismoulin.com> Date: Tue, 19 Sep 2023 19:38:50 +0300 Subject: [PATCH] feat: updated provider/testing/dummy_node with infinite loop and incremental line number ouput with random sleeping --- crates/provider/testing/dummy_node | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/provider/testing/dummy_node b/crates/provider/testing/dummy_node index b8492b8..4a6e0cd 100755 --- a/crates/provider/testing/dummy_node +++ b/crates/provider/testing/dummy_node @@ -1,7 +1,11 @@ -#!/bin/sh +#!/bin/bash -echo "Line 1" -sleep 1 -echo "Line 2" -sleep 1 -echo "Line 3" \ No newline at end of file +i=0 + +# infinite loop to simulate long-running process with fake output +while :; do + echo "Line $i" + i=$((i+1)) + # sleep randomly between 1 and 3 (included) seconds + sleep $((RANDOM % 3 + 1)) +done \ No newline at end of file -- GitLab