I am using Java SDK to develop an application and I created a DAO layer in my application to store my entities.
And I am facing an issue that my tests are taking too long to run because of the time the SDK takes to disconnect from Couchbase.
If just call the Bucket.close() methods the tests run and finish just fine (under 2 seconds).
But if I issue Cluster.disconnect() the tests take up to 6 seconds to finish.
I am putting both Bucket.close() and Cluster.disconnect() on @AfterClass of JUnit to just close the connection after all tests have been run.
So here are my questions:
- Is there any problem if I just issue the Bucket.close() part and not the Cluster.disconnect() part?
- How Couchbase handle those dangling connections?
- Does it purge after a timeout of inactivity?
Thanks in advance.