Skip to content

Commit e7b4d6a

Browse files
committed
Fixed race condition in tests.
1 parent e77a363 commit e7b4d6a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/transports.websocket.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ module.exports = {
751751
});
752752

753753
cl3.handshake(function (sid) {
754-
var ws3 = websocket(cl2, sid);
754+
var ws3 = websocket(cl3, sid);
755755
ws3.on('message', function (msg) {
756756
if (!ws3.connected) {
757757
msg.type.should.eql('connect');
@@ -848,7 +848,7 @@ module.exports = {
848848
});
849849

850850
cl3.handshake(function (sid) {
851-
var ws3 = websocket(cl2, sid);
851+
var ws3 = websocket(cl3, sid);
852852
ws3.on('message', function (msg) {
853853
if (!ws3.connected) {
854854
msg.type.should.eql('connect');
@@ -947,7 +947,7 @@ module.exports = {
947947
});
948948

949949
cl3.handshake(function (sid) {
950-
var ws3 = websocket(cl2, sid);
950+
var ws3 = websocket(cl3, sid);
951951
ws3.on('message', function (msg) {
952952
if (!ws3.connected) {
953953
msg.type.should.eql('connect');
@@ -1034,7 +1034,7 @@ module.exports = {
10341034
});
10351035

10361036
cl3.handshake(function (sid) {
1037-
var ws3 = websocket(cl2, sid);
1037+
var ws3 = websocket(cl3, sid);
10381038
ws3.on('open', function () {
10391039
ws3.packet({
10401040
type: 'event'
@@ -1129,7 +1129,7 @@ module.exports = {
11291129
});
11301130

11311131
cl3.handshake(function (sid) {
1132-
var ws3 = websocket(cl2, sid);
1132+
var ws3 = websocket(cl3, sid);
11331133
ws3.on('open', function () {
11341134
ws3.packet({
11351135
type: 'event'
@@ -1226,7 +1226,7 @@ module.exports = {
12261226
});
12271227

12281228
cl3.handshake(function (sid) {
1229-
var ws3 = websocket(cl2, sid);
1229+
var ws3 = websocket(cl3, sid);
12301230
ws3.on('open', function () {
12311231
ws3.packet({
12321232
type: 'event'
@@ -1319,7 +1319,7 @@ module.exports = {
13191319

13201320
ws2.on('open', function () {
13211321
cl3.handshake(function (sid) {
1322-
var ws3 = websocket(cl2, sid);
1322+
var ws3 = websocket(cl3, sid);
13231323
ws3.on('open', function () {
13241324
ws3.packet({
13251325
type: 'event'
@@ -1418,7 +1418,7 @@ module.exports = {
14181418

14191419
ws2.on('open', function () {
14201420
cl3.handshake(function (sid) {
1421-
var ws3 = websocket(cl2, sid);
1421+
var ws3 = websocket(cl3, sid);
14221422
ws3.on('open', function () {
14231423
ws3.packet({
14241424
type: 'event'
@@ -1519,7 +1519,7 @@ module.exports = {
15191519

15201520
ws2.on('open', function () {
15211521
cl3.handshake(function (sid) {
1522-
var ws3 = websocket(cl2, sid);
1522+
var ws3 = websocket(cl3, sid);
15231523
ws3.on('open', function () {
15241524
ws3.packet({
15251525
type: 'event'

0 commit comments

Comments
 (0)