I have a Java application that interacts with a SQL Server database. I want to write some unit tests to test the connection properties like lockTimeout, queryTimeout, loginTimeout and socketTimeout etc.
What would be the best way to test the above scenarios? One approach would be to write code for each situation, prepare the situation and run that piece of code. It will be a kind of manual testing more. Is there any other way/ library to test SQL Server properties?
You can run queries on the SQL server to determine the config:
The connection / Socket timeout is set in the connection string, so you should already know that.