senecajs / seneca-mongo-store

Node.js Seneca data storage plugin for MongoDB
MIT License
35 stars 43 forks source link

non-deterministic test failure #100

Open rjrodger opened 3 years ago

rjrodger commented 3 years ago

Failed tests:

115) shared tests Upserts bombarding the store with near-parallel upserts has no race condition - creates a single new entity:

  seneca: Action cmd:save,role:entity failed: E11000 duplicate key error collection: senecatest.users index: email_1 dup key: { : "jimi@experience.com" }.

MongoError: E11000 duplicate key error collection: senecatest.users index: email_1 dup key: { : "jimi@experience.com" } at MessageStream.messageHandler (/Users/richard/Projects/seneca/mongo-store/node_modules/mongodb/lib/cmap/connection.js:263:20) at MessageStream.emit (events.js:315:20) at processIncomingData (/Users/richard/Projects/seneca/mongo-store/node_modules/mongodb/lib/cmap/message_stream.js:144:12) at MessageStream._write (/Users/richard/Projects/seneca/mongo-store/node_modules/mongodb/lib/cmap/message_stream.js:42:5) at writeOrBuffer (internal/streams/writable.js:358:12) at MessageStream.Writable.write (internal/streams/writable.js:303:10) at Socket.ondata (internal/streams/readable.js:719:22) at Socket.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Socket.Readable.push (internal/streams/readable.js:223:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

Either this is a real issue to be solved, or the test is validating a feature that is not supported

rjrodger commented 3 years ago

non-deterministic as failure does no occur on every run

all unit tests must be deterministic