Original post

I have written two integration tests, one for db layer and other for service layer and I have two TestMain to do the db setup and tear down. Also, I am using the same db (mongo) in both the tests. My tests run fine locally but fails during the pipeline run with the error:

error[(DatabaseDropPending) Cannot create collection 5ca5a2c479358e67a64f927b_testdb.users – database is in the process of being dropped.]“

I believe the two TestMain are running in parallel and while one of them is dropping the db, the other one is trying to create indexes on that db. Can anyone please help?