Closed lukas-vlcek closed 7 years ago
Here is how I tested this functionality. The following script runs watches
for 10 seconds and get data from ES every second. However, the script is terminated after 5 seconds:
#!/bin/bash
cat /dev/null > test.log
watches cluster_health -l -d 10 -i 1 > test.log &
echo started $!
sleep 5
kill -s TERM $!
echo Number of lines in log life: `cat test.log | wc -l`
In the past the log file was empty, now we can use both TERM
or INT
kill signals and the log file contains 5 rows (which is expected):
$ ./run.sh
+ cat /dev/null
+ echo started 39506
started 39506
+ sleep 5
+ watches cluster_health -l -d 10 -i 1
+ kill -s TERM 39506
++ cat test.log
++ wc -l
+ echo Number of lines in log life: 5
Number of lines in log life: 5
@richm PTAL
Closes #25