Added a sanity check test to make sure we aren't accidentally emitting server heartbeats early

This commit is contained in:
Zach Musgrave
2025-02-27 12:16:12 -08:00
parent 529fbe7e72
commit 1f983d7b40

View File

@@ -119,6 +119,17 @@ teardown() {
wc=`grep SQL_SERVER_HEARTBEAT heartbeats.out | wc -l`
[ $wc -gt 0 ]
# make sure we don't emit until the timer goes off
DOLT_EVENTS_EMITTER=logger DOLT_SQL_SERVER_HEARTBEAT_INTERVAL=10s dolt sql-server -l debug > heartbeats.out 2>&1 &
server_pid=$!
sleep 5
kill $server_pid
cat heartbeats.out
wc=`grep SQL_SERVER_HEARTBEAT heartbeats.out | wc -l`
[ $wc -eq 0 ]
}
# TODO: we need a local metrics server here that we can spin up to verify the send actually works