thenativeweb / node-eventstore

EventStore Implementation in node.js
http://eventstore.js.org/
MIT License
539 stars 116 forks source link

Unit tests failing #140

Closed tpaulshippy closed 4 years ago

tpaulshippy commented 5 years ago

When I pull down the repo and run the tests, I get 312 passing and 10 failing. Am I missing a setup step?

Here are the failures:

1) eventstore calling that function with options containing a type property with the value of "mongodb" having initialized (connected) using the eventstore "before all" hook:
     MongoError: command delete requires authentication
      at node_modules/mongodb-core/lib/connection/pool.js:581:63
      at authenticateStragglers (node_modules/mongodb-core/lib/connection/pool.js:504:16)
      at Connection.messageHandler (node_modules/mongodb-core/lib/connection/pool.js:540:5)
      at emitMessageHandler (node_modules/mongodb-core/lib/connection/connection.js:310:10)
      at Socket.<anonymous> (node_modules/mongodb-core/lib/connection/connection.js:453:17)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at Socket.Readable.push (_stream_readable.js:208:10)
      at TCP.onread (net.js:597:20)

  2) eventstore calling that function with options containing a type property with the value of "mongodb" having initialized (connected) using the eventstore "after all" hook:
     MongoError: command delete requires authentication
      at node_modules/mongodb-core/lib/connection/pool.js:581:63
      at authenticateStragglers (node_modules/mongodb-core/lib/connection/pool.js:504:16)
      at Connection.messageHandler (node_modules/mongodb-core/lib/connection/pool.js:540:5)
      at emitMessageHandler (node_modules/mongodb-core/lib/connection/connection.js:310:10)
      at Socket.<anonymous> (node_modules/mongodb-core/lib/connection/connection.js:453:17)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at Socket.Readable.push (_stream_readable.js:208:10)
      at TCP.onread (net.js:597:20)

  3) eventstore calling that function with options containing a type property with the value of "redis" calling init without callback it should emit connect:
     Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  4) eventstore calling that function with options containing a type property with the value of "redis" having initialized (connected) using the eventstore "before all" hook:
     AbortError: Connection forcefully ended and command aborted.
      at RedisClient.flush_and_error (node_modules/redis/index.js:362:23)
      at RedisClient.end (node_modules/redis/lib/extendedApi.js:52:14)
      at Redis.disconnect (lib/databases/redis.js:165:19)
      at RedisClient.<anonymous> (lib/databases/redis.js:101:12)
      at RedisClient.connection_gone (node_modules/redis/index.js:590:14)
      at RedisClient.on_error (node_modules/redis/index.js:410:10)
      at Socket.<anonymous> (node_modules/redis/index.js:279:14)
      at emitErrorNT (internal/streams/destroy.js:64:8)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickCallback (internal/process/next_tick.js:180:9)

  5) eventstore calling that function with options containing a type property with the value of "redis" having initialized (connected) using the eventstore "after all" hook:
     AbortError: DEL can't be processed. The connection is already closed.
      at handle_offline_command (node_modules/redis/index.js:851:15)
      at RedisClient.internal_send_command (node_modules/redis/index.js:885:9)
      at RedisClient.del (node_modules/redis/lib/commands.js:58:25)
      at lib/databases/redis.js:175:21
      at node_modules/async/dist/async.js:3866:24
      at eachOfArrayLike (node_modules/async/dist/async.js:1055:9)
      at eachOf (node_modules/async/dist/async.js:1103:5)
      at _parallel (node_modules/async/dist/async.js:3865:5)
      at Object.parallelLimit [as parallel] (node_modules/async/dist/async.js:3948:5)
      at Redis.clear (lib/databases/redis.js:173:11)
      at Context.<anonymous> (test/eventstoreTest.js:1000:26)

  6) "mongodb" store implementation creating an instance having connected using the store "before each" hook for "it should callback with a new Id as string":
     MongoError: command delete requires authentication
      at node_modules/mongodb-core/lib/connection/pool.js:581:63
      at authenticateStragglers (node_modules/mongodb-core/lib/connection/pool.js:504:16)
      at Connection.messageHandler (node_modules/mongodb-core/lib/connection/pool.js:540:5)
      at emitMessageHandler (node_modules/mongodb-core/lib/connection/connection.js:310:10)
      at Socket.<anonymous> (node_modules/mongodb-core/lib/connection/connection.js:453:17)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at Socket.Readable.push (_stream_readable.js:208:10)
      at TCP.onread (net.js:597:20)

  7) "mongodb" store implementation creating an instance having connected using the store "after all" hook:
     MongoError: command delete requires authentication
      at node_modules/mongodb-core/lib/connection/pool.js:581:63
      at authenticateStragglers (node_modules/mongodb-core/lib/connection/pool.js:504:16)
      at Connection.messageHandler (node_modules/mongodb-core/lib/connection/pool.js:540:5)
      at emitMessageHandler (node_modules/mongodb-core/lib/connection/connection.js:310:10)
      at Socket.<anonymous> (node_modules/mongodb-core/lib/connection/connection.js:453:17)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at Socket.Readable.push (_stream_readable.js:208:10)
      at TCP.onread (net.js:597:20)

  8) "redis" store implementation creating an instance calling connect it should emit connect:
     Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  9) "redis" store implementation creating an instance having connected using the store "before each" hook for "it should callback with a new Id as string":
     AbortError: DEL can't be processed. The connection is already closed.
      at handle_offline_command (node_modules/redis/index.js:851:15)
      at RedisClient.internal_send_command (node_modules/redis/index.js:885:9)
      at RedisClient.del (node_modules/redis/lib/commands.js:58:25)
      at lib/databases/redis.js:175:21
      at node_modules/async/dist/async.js:3866:24
      at eachOfArrayLike (node_modules/async/dist/async.js:1055:9)
      at eachOf (node_modules/async/dist/async.js:1103:5)
      at _parallel (node_modules/async/dist/async.js:3865:5)
      at Object.parallelLimit [as parallel] (node_modules/async/dist/async.js:3948:5)
      at Redis.clear (lib/databases/redis.js:173:11)
      at Context.<anonymous> (test/storeTest.js:127:19)

  10) "redis" store implementation creating an instance having connected using the store "after all" hook:
     AbortError: DEL can't be processed. The connection is already closed.
      at handle_offline_command (node_modules/redis/index.js:851:15)
      at RedisClient.internal_send_command (node_modules/redis/index.js:885:9)
      at RedisClient.del (node_modules/redis/lib/commands.js:58:25)
      at lib/databases/redis.js:175:21
      at node_modules/async/dist/async.js:3866:24
      at eachOfArrayLike (node_modules/async/dist/async.js:1055:9)
      at eachOf (node_modules/async/dist/async.js:1103:5)
      at _parallel (node_modules/async/dist/async.js:3865:5)
      at Object.parallelLimit [as parallel] (node_modules/async/dist/async.js:3948:5)
      at Redis.clear (lib/databases/redis.js:173:11)
      at Context.<anonymous> (test/storeTest.js:131:19)
nanov commented 5 years ago

your mongo setup ( and probably redis ) requires authentication for `delete. You could try and manipulate the connection string/object in the tests ( do not commit, only on local ) with the appropriate authentication data.

susannaroden commented 4 years ago

Hey everyone 👋

New maintainer here… we, i.e. @thenativeweb, have taken over the responsibility to maintain this module from @adrai, and I would like to give a little update on this issue:

One of the first things we are going to do is to update the test setup, so that it becomes easier to run the tests in a reliable way. So for now, I am going to close this issue.

If you have any questions or anything else, please feel free to re-open it, or to open a new one 😊