samedi 25 novembre 2017

Testing findOneAndUpdate upsert duplicate prevention

Hi I have a node js code that uses the findOneAndUpdate with Upsert = true to create a new mongodb document if one does not exist.

I want to test if two async threads simultaneously calls my code then will it create duplicates.

Is that even possible to test? How can I do that. I am a beginner in testing.

Aucun commentaire:

Enregistrer un commentaire