Hi,
I encountered the same issue, this time while using .NET, so it doesn’t appear to be driver-related.
I was able to “fix” it by allowing more time for the MongoDB Atlas container to start up — simply adding a delay during test initialization resolved the problem.
Probably not the best solution but it works.