fix unstable ws test handler + improve logging

This commit is contained in:
tiagosiebler
2022-12-28 13:40:20 +00:00
parent dcf5050d32
commit f0394f91e9
4 changed files with 19 additions and 16 deletions

View File

@@ -49,7 +49,7 @@ describe('Public Unified Margin Websocket Client (Perps - USDT)', () => {
const wsUpdatePromise = waitForSocketEvent(wsClient, 'update');
// USDT should be detected and automatically routed through the USDT connection
const topic = 'orderbook.25.BTCUSDT';
const topic = 'orderbook.1.BTCUSDT';
wsClient.subscribe(topic);
try {
@@ -74,10 +74,11 @@ describe('Public Unified Margin Websocket Client (Perps - USDT)', () => {
},
topic: topic,
ts: expect.any(Number),
type: 'snapshot',
wsKey: WS_KEY_MAP.unifiedPerpUSDTPublic,
type: 'snapshot',
});
} catch (e) {
console.error('unified margin perp usdt orderbook test fail', e);
// no data
expect(e).toBeFalsy();
}