Karate MongoDB – Failed looking up TXT record for host cluster-name.xxx.mongodb.net
Using MongoDB Java driver v5.1, I can connect to the MongoDB cluster and query a document successfully from a Java main method. However, querying a document from MongoDB for Karate test gives the error: Failed looking up TXT record for host cluster-name.xxx.mongodb.net
. My connection string is in the format: mongodb+srv://<username>:<password>@cluster-name.xxx.mongodb.net/?retryWrites=true&w=majority
.