Mongodb - mflix potential bug or?

**A generic solution:**
Hey everyone. I would like to share with you an issue that I unfortunately had to deal with the whole day.

Specifically: Ticket User - Management & User Preferences

The problem with this two tickets were that one should be right implemented before or after the other.

To be more precise you could not pass the addUser test if you did not implement both the addUser & updatePreferences methods. Furthermore the test would not pass also if you did implement the addUser in the right way but not implement the writeConcern.

So as I was saying today I tried unlimited times to solve those 2 Tickets.
I also replaced the usersDAO.js file because i (I thought) lost the control inside the file.

Moreover, I passed the usersManagement Ticket 4 or 5 hours before but still when trying implementing the userspPreferences ticket the updatePreferences ticket failed!

The solution:

I won’t go into details to how this ‘bug’ occurs, but in simple terms when running the tests for a specific ticket and for some reason (that you don’t understand it/does not make sense) just repeat the testing again and again. 2 to 3 times.


It is not an illusion I had. It’s just happened to me moments ago.

For example:

I ran the same test twice on the same ticket for a specific function and the pass/fail results were completely different. The difference between the first and the second test was that i just saved the file (you know this developer’s uncertainty to always CTRL+s) and from 1 pass / 3 fails it changes to 3 pass / 1 fail. With just only one CTRL+s shortcut.

Disclaimer: I am not judging anything concerning MongoDB community projects etc. Maybe my CPU is just too slow to deal with testing (i9-7800k) which I don’t believe it, some bug with vs code or some other reason.

Tests & the forum

Surely, manipulating the tests won’t do the trick. Obviously the tests exist just to help you figure out what and sometimes how to go through a task.
In the forum you only find the way. But you need to cross it on your own. Don’t expect copy pasting.


In conclusion a hint would be just repeat testing in some cases you are sure more than enough for your source code.

That my humble advice.
Thank you and sorry for chattering.