bugfix/tests/scaling: Socket query test fix (#4974)
fix socketio test where res.req is not available.pr-4979-for-frontend-tests
parent
2b98b930d7
commit
b80f5bdae8
|
@ -52,7 +52,10 @@ const connect = async (res) => {
|
||||||
([name, cookie]) => `${name}=${encodeURIComponent(cookie.value)}`).join('; ');
|
([name, cookie]) => `${name}=${encodeURIComponent(cookie.value)}`).join('; ');
|
||||||
|
|
||||||
logger.debug('socket.io connecting...');
|
logger.debug('socket.io connecting...');
|
||||||
const padId = res.req.path.split('/p/')[1];
|
let padId = null;
|
||||||
|
if (res) {
|
||||||
|
padId = res.req.path.split('/p/')[1];
|
||||||
|
}
|
||||||
const socket = io(`${common.baseUrl}/`, {
|
const socket = io(`${common.baseUrl}/`, {
|
||||||
forceNew: true, // Different tests will have different query parameters.
|
forceNew: true, // Different tests will have different query parameters.
|
||||||
path: '/socket.io',
|
path: '/socket.io',
|
||||||
|
|
Loading…
Reference in New Issue