mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-11 09:20:52 +08:00
fix: add actionable DingTalk connection diagnostics
This commit is contained in:
parent
3010535409
commit
1b05fa8d32
18 changed files with 1038 additions and 299 deletions
|
|
@ -376,10 +376,16 @@ test('runtime never reports ready when connect resolves before the socket opens
|
|||
logger: { warn() {}, error() {} },
|
||||
});
|
||||
|
||||
await assert.rejects(runtime.start(), /handshake timed out/);
|
||||
await assert.rejects(
|
||||
runtime.start(),
|
||||
(error) => error.code === 'dingtalk-stream-connect-failed'
|
||||
&& /handshake timed out/.test(error.message)
|
||||
&& error.cause?.message === error.message,
|
||||
);
|
||||
assert.equal(disconnects, 1);
|
||||
assert.equal(runtime.status.ready, false);
|
||||
assert.equal(runtime.status.dingtalkStreamState, 'failed');
|
||||
assert.match(runtime.status.lastError, /handshake timed out/);
|
||||
});
|
||||
|
||||
test('runtime bounds a stalled SDK gateway lookup and disconnects a late connection', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue