Skip to content

Commit

Permalink
Fixed race condition in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Jun 12, 2011
1 parent e77a363 commit e7b4d6a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/transports.websocket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ module.exports = {
});

cl3.handshake(function (sid) {
var ws3 = websocket(cl2, sid);
var ws3 = websocket(cl3, sid);
ws3.on('message', function (msg) {
if (!ws3.connected) {
msg.type.should.eql('connect');
Expand Down Expand Up @@ -848,7 +848,7 @@ module.exports = {
});

cl3.handshake(function (sid) {
var ws3 = websocket(cl2, sid);
var ws3 = websocket(cl3, sid);
ws3.on('message', function (msg) {
if (!ws3.connected) {
msg.type.should.eql('connect');
Expand Down Expand Up @@ -947,7 +947,7 @@ module.exports = {
});

cl3.handshake(function (sid) {
var ws3 = websocket(cl2, sid);
var ws3 = websocket(cl3, sid);
ws3.on('message', function (msg) {
if (!ws3.connected) {
msg.type.should.eql('connect');
Expand Down Expand Up @@ -1034,7 +1034,7 @@ module.exports = {
});

cl3.handshake(function (sid) {
var ws3 = websocket(cl2, sid);
var ws3 = websocket(cl3, sid);
ws3.on('open', function () {
ws3.packet({
type: 'event'
Expand Down Expand Up @@ -1129,7 +1129,7 @@ module.exports = {
});

cl3.handshake(function (sid) {
var ws3 = websocket(cl2, sid);
var ws3 = websocket(cl3, sid);
ws3.on('open', function () {
ws3.packet({
type: 'event'
Expand Down Expand Up @@ -1226,7 +1226,7 @@ module.exports = {
});

cl3.handshake(function (sid) {
var ws3 = websocket(cl2, sid);
var ws3 = websocket(cl3, sid);
ws3.on('open', function () {
ws3.packet({
type: 'event'
Expand Down Expand Up @@ -1319,7 +1319,7 @@ module.exports = {

ws2.on('open', function () {
cl3.handshake(function (sid) {
var ws3 = websocket(cl2, sid);
var ws3 = websocket(cl3, sid);
ws3.on('open', function () {
ws3.packet({
type: 'event'
Expand Down Expand Up @@ -1418,7 +1418,7 @@ module.exports = {

ws2.on('open', function () {
cl3.handshake(function (sid) {
var ws3 = websocket(cl2, sid);
var ws3 = websocket(cl3, sid);
ws3.on('open', function () {
ws3.packet({
type: 'event'
Expand Down Expand Up @@ -1519,7 +1519,7 @@ module.exports = {

ws2.on('open', function () {
cl3.handshake(function (sid) {
var ws3 = websocket(cl2, sid);
var ws3 = websocket(cl3, sid);
ws3.on('open', function () {
ws3.packet({
type: 'event'
Expand Down

0 comments on commit e7b4d6a

Please sign in to comment.