Data in the database different from the expected in the Unit Tests

Is it possible that Data in the database different from the expected in the Unit Test?

I have no films with the title - “Once Upon a Time in Mexico” in my imported database.

Is this only mine problem or someone else has similar issue?

I can find that movie in my imported database.

I have downloaded application again but from another place using different link and now everything works fine.

Thanks for help

1 Like

Hi andriibojko,

Glad you solved the issue.

For future reference, please provide the link which worked for you. And also the link which din’t work.
So that we can solve the issue for everyone.


Hi, I have the same issue. I saw that the Unit Test was failing… so i decided to connect to the mflix database with MongoDB Compass to have a look, and lo and behold, the document for the movie, “Once Upon a Time In Mexico”, with Salma Hayek, isn’t in the collection. I see there are only 1000 movies in the imported movie collection. Hence, why some of the db-connection tests are failing. The test titles aren’t in our cluster’s imported database.

Honestly don’t know what to do… i’m not an advanced programmer… I’ve been literally tearing my hair out to get our course dev env running… it just seems like a lot of the setup elements are just broken… it’s really tough to try to learn MongoDB when the course environment appears to be out of date.

Is it just me, are do i just have a corrupted application install?

Any assistance is deeply appreciated!

@Integrion Your comment here is “out of date”. The thread was started by a different class over a month ago.

Look for the threads dated within the last 14 days, which would be from the current class. And the issues of unit tests not matching data has been brought up and solved with instructions several times more recently.

Hi, so perhaps my comment here is ‘out of date’. However, the issues of unit tests not matching data presumably having been already brought up and resolved with clear instructions as you allege is clear as mud. Nowhere did I see what you suggest as being the solution. Instead, I came across and found numerous threads that seemed to assert that the data solution provided in the course was somehow out sync with the unit tests. This certainly appeared to be corroborated when I directly inspected the database using Compass . In my case I just lucked out and resolved the issue by simply re-importing the database. I found that solution on my own.

Anyway, thanks for your reply and suggestion. It’s much appreciated.