datastax/java-driver — pull request #231 by pingtimeout (2014-09-23 14:04:24+00:00)
Title: Add stress test for opening/closing sessions (JAVA-432)

At line 75, the number of repetitions can be specified for this test. This allows for opening a lot of sessions without hitting the limit on "Too many open files".

Note that on my machine, specifying more than 2 repetitions causes the test to fail because of a connection issue.