spring-data-orientdb
spring-data-orientdb copied to clipboard
Performance tests
One basic test required is a functional/performance tests with * many thread acquiring/releasing a connection * with the orientdb factory.
@sleroy I suggest we use something like JMH... I think the main project has such tests too.
JMH is a good idea. To give some feedback, in one of my first implementation/ modification on my fork. I integrated the spring-data-orientdb connetor to a spring boot application with spring MVC. I was associating a request with @Transactional. When I test my tool project, I had the surprise to receive errors past the maximum number of allowed connections to the pool.
This problem could have been detected with a JUnit/TestNG test performing something like :
Executor ex = Executors.newCachedThreadPool(BIG_NUMBER_THREADS);
for (int i ; i =0 i < BIG_NUMBER_THREADS) {
ex.submit(new NewTransactionCallable())
}
ex.shutdown();
`
+1
@sleroy module with a simple example is added.