Heartbeat

This commit is contained in:
chk
2026-06-12 17:03:38 +02:00
parent 4db6c472b7
commit 6fc6605080
11 changed files with 342 additions and 32 deletions

View File

@@ -35,6 +35,7 @@ describe('Sender Interface and TelnetSenderGRBL implementation', () => {
createConnection: () => {
const socket = new EventEmitter();
socket.end = jest.fn();
socket.setKeepAlive = jest.fn(); // benötigt für TCP-Keepalive im connect-Handler
process.nextTick(() => {
connectAttempts += 1;
@@ -68,6 +69,8 @@ describe('Sender Interface and TelnetSenderGRBL implementation', () => {
netModule: netMock,
TelnetSocketClass: DummyTelnetSocket,
setTimeoutFn: (fn) => fn(),
setIntervalFn: jest.fn(() => 1), // Heartbeat-Timer: kein echter Intervall
clearIntervalFn: jest.fn(),
autoConnect: false,
reconnectDelay: 1,
maxReconnectDelay: 2