Uploaded image for project: 'AMQ Clients'
  1. AMQ Clients
  2. ENTMQCL-3870

[js] queue browser example fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • CP
    • rhea
    • None
    • False
    • None
    • False
      1. install rhea client
      2. start AMQ Broker
      3. run the queue browser example using test_examples.js

      # mocha test_examples.js --grep  browser
        brokered examples
      	1) queue browser
      
      
        0 passing (2s)
        1 failing
      
        1) brokered examples
      	   queue browser:
      	 Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/root/examples/test_examples.js)
      	  at listOnTimeout (node:internal/timers:569:17)
      	  at process.processTimers (node:internal/timers:512:7)
      

      Nothing wrong with the examples itself, but with the tests trigger (test_examples.js), The issue is that the sender (selector/sender.js) creates multicast address, that is cleaned out after disconnect, so there is nothing to browse or consume.

      Note: On previous AMQ Broker releases (prior to 7.11.0), the test suite was passing because anycast queue/address was created by a first receiver execution (in HelloWorld example).
      With AMQ Broker 7.11.0 and later, multicast queue/address is created by receivers by default, which broke the test suite. When the test is executed separately, it always fails.

      Possible solutions:

      • pre-create anycast address/queue examples in test_examples.js
      • document that anycast address/queue should be pre-created
      • use queue capabilities in the test

              pematous Petr Matousek
              pematous Petr Matousek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: