Tests | Support multi-platform testing with exclusion tags and fix Skipping tests#1015
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1015 +/- ##
============================================
+ Coverage 50.09% 50.36% +0.26%
- Complexity 2878 2900 +22
============================================
Files 120 120
Lines 27989 27989
Branches 4677 4677
============================================
+ Hits 14022 14096 +74
+ Misses 11713 11633 -80
- Partials 2254 2260 +6
Continue to review full report at Codecov.
|
5a0fec0 to
58a53c8
Compare
| public static void terminateVariation() throws SQLException { | ||
| try (Connection connection = DriverManager.getConnection(connectionString); | ||
| Statement stmt = connection.createStatement()) { | ||
| try (Statement stmt = connection.createStatement()) { |
There was a problem hiding this comment.
Why are we changing the tests to use connection from AbstractTest? Dropping tables will fail if that connection is broken.
There was a problem hiding this comment.
This Static Connection is recreated everytime with every test class. This is an attempt to reduce number of connections specially when running tests with Azure databases.
There was a problem hiding this comment.
As also mentioned in PR description, this change reduces time of Junit execution by 45 secs in normal run (against SQL 2019) and much more on Azure databases.
This PR
Tagging tests for exclusions safely excludes test classes/tests from being tested against targeted SQL Server. Exclusion tags are based on non-compatibility of tests against respective SQL Servers.
jacoco:mergeto generate cumulative code coverage for the source code.connectioninstance fromAbstractTestfor operations that do not require special connection like creating/dropping objects. Thisconnectionis created either way with every test. Reduces execution time by 45 secs.