Move the two channels test to the dev appserver, since the second channel never connects in prod.

This commit is contained in:
Ian Gulliver
2014-05-23 11:45:34 -07:00
parent 1ec2340f48
commit 9b14a5a14b

View File

@@ -441,32 +441,6 @@ asyncTest('sendMessage ACL', function() {
});
});
asyncTest('Two channels, one client', function() {
expect(2);
var namespace = randstring();
var subject = randstring();
var message = randstring();
var callbacks = {
'onMessage': function(msg) {
console.log('onMessage');
equal(msg['subject']['name'], subject, 'subject matches');
equal(msg['message'], message, 'message matches');
cosmo1.shutdown();
start();
},
};
var cosmo1 = new Cosmopolite(callbacks, null, namespace);
cosmo1.subscribe(subject).then(function() {
var cosmo2 = new Cosmopolite({}, null, namespace);
cosmo2.sendMessage(subject, message).then(function() {
cosmo2.shutdown();
});
});
});
module('dev_appserver only');
@@ -532,3 +506,29 @@ asyncTest('Profile merge', function() {
cosmo.subscribe(subject, -1);
});
});
asyncTest('Two channels, one client', function() {
expect(2);
var namespace = randstring();
var subject = randstring();
var message = randstring();
var callbacks = {
'onMessage': function(msg) {
console.log('onMessage');
equal(msg['subject']['name'], subject, 'subject matches');
equal(msg['message'], message, 'message matches');
cosmo1.shutdown();
start();
},
};
var cosmo1 = new Cosmopolite(callbacks, null, namespace);
cosmo1.subscribe(subject).then(function() {
var cosmo2 = new Cosmopolite({}, null, namespace);
cosmo2.sendMessage(subject, message).then(function() {
cosmo2.shutdown();
});
});
});