You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
501 B

require('./harness').run();
var timeout = null;
var confirmed = 0;
connection.addListener('ready', function () {
connection.exchange('node-publish-confirms', {type: 'fanout', confirm: true}, function(exchange) {
exchange.publish("", "hello", { mandatory: true },function(){
confirmed++;
clearTimeout(timeout);
connection.end();
});
});
});
timeout = setTimeout(function() {
process.exit();
}, 1000);
process.on('exit', function(){
assert.equal(confirmed, 1);
});