<commit_before>require('./harness');

connection.removeListener('error', errorCallback);
connection.addListener('error', function (err) {
  assert.equal(err.code, 530)
  assert.ok(err.message.indexOf('NOT_ALLOWED') == 0);
});

connection.on('ready', function () {
  puts("connected to " + connection.serverProperties.product);

  var exchange = connection.exchange('node-queue-args', {type: 'fanout'});

  connection.queue('node-queue-args-queue', {
      'arguments': {'x-expires': 3600000}
  }, function(q) {
    puts("queue declared");
    connection.queue('node-queue-args-queue', {
        'arguments': {'x-expires': 3600001}
    }, function(q2) {
    });
  });
});<commit_msg>queue arguments test compatible with RabbitMQ 2.6.1<commit_after>require('./harness');

connection.on('ready', function() {
  puts("connected to " + connection.serverProperties.product);

  var exchange = connection.exchange('node-queue-args', {type: 'fanout'});
  exchange.on('close', function(err) {
      console.log(err);
  });

  connection.queue('node-queue-args-queue', {
      'arguments': {'x-expires': 3600000}
  }, function(q) {
    puts("queue declared");
    var conn = amqp.createConnection({});

    conn.on('ready', function() {
      var q = conn.queue('node-queue-args-queue', {
          'arguments': {'x-expires': 3600001}
        }, function(q2) {
          puts("second queue declared");
      });
      q.on('error', function(err) {
        assert.equal(err.code, 406);
        assert.ok(err.message.indexOf('PRECONDITION_FAILED') == 0);
        connection.end();
        conn.end();
      });
    });
  });
});
{'fraction_non_alphanumeric': 0.19492574257425743, 'fraction_numerical': 0.025371287128712873, 'mean_word_length': 3.554929577464789, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7114845', 'n_tokens_mistral': 540, 'n_tokens_neox': 503, 'n_words': 82}