eventuate-clients / eventuate-client-nodejs

Other
4 stars 3 forks source link

Uncaught Error: listen EADDRINUSE :::9000 #46

Open cer opened 6 years ago

cer commented 6 years ago

This occurred after merging latest PR. See error below, which occurs on some machines. Unclear whether the tests are written in a reliable way. A better approach would be for each test to use a different port/Eventuate Client, e.g. use https://www.npmjs.com/package/get-port to find a free port.

 65 passing (14s)
  5 failing

  1) Retry REST methods should retry create():
     Uncaught Error: listen EADDRINUSE :::9000
      at Object._errnoException (util.js:1024:11)
      at _exceptionWithHostPort (util.js:1046:20)
      at Server.setupListenHandle [as _listen2] (net.js:1351:14)
      at listenInCluster (net.js:1392:12)
      at Server.listen (net.js:1476:7)
      at Context.done (test/EventuateClientPromisesRetry-spec.js:50:12)

  2) Retry REST methods should retry update():
     Uncaught Error: listen EADDRINUSE :::9000
      at Object._errnoException (util.js:1024:11)
      at _exceptionWithHostPort (util.js:1046:20)
      at Server.setupListenHandle [as _listen2] (net.js:1351:14)
      at listenInCluster (net.js:1392:12)
      at Server.listen (net.js:1476:7)
      at Context.done (test/EventuateClientPromisesRetry-spec.js:68:12)

  3) Retry REST methods should retry loadEvents():
     Uncaught Error: listen EADDRINUSE :::9000
      at Object._errnoException (util.js:1024:11)
      at _exceptionWithHostPort (util.js:1046:20)
      at Server.setupListenHandle [as _listen2] (net.js:1351:14)
      at listenInCluster (net.js:1392:12)
      at Server.listen (net.js:1476:7)
      at Context.done (test/EventuateClientPromisesRetry-spec.js:86:12)

  4) Create entity, subscribe for event and update with triggeringEventToken should create and update one uniquely named entity and subscribe for events: