tested if a different clenup order can fix `Promise resolution is still pending but the event loop has already resolved`

pull/4451/head
Frank Elsinga 2 months ago
parent f59b931ffc
commit e23730af24

@ -44,11 +44,11 @@ function testMqtt(mqttSuccessMessage, mqttCheckType, receivedMessage, onSuccess,
status: PENDING,
};
mqttMonitorType.check(monitor, heartbeat, {})
.then(() => onSuccess(heartbeat), onError)
.finally(() => {
.then(()=>{
testMqttClient.end();
hiveMQContainer.stop();
});
})
.then(() => onSuccess(heartbeat), onError)
const testMqttClient = mqtt.connect(hiveMQContainer.getConnectionString());
testMqttClient.on("connect", () => {

Loading…
Cancel
Save