@@ -91,8 +91,6 @@ public List<String> getTestPaths() {
9191 public int run() throws Exception {
9292 final ConnectionInfo ci = getConnectionInfo();
9393
94- // First of all do a compatibility check and fail-fast
95- checkFrameworkCompatibility(ci);
9694
9795 final List<ReporterOptions> reporterOptionsList = getReporterOptionsList();
9896 final List<String> testPaths = getTestPaths();
@@ -118,6 +116,10 @@ public int run() throws Exception {
118116
119117 // Do the reporters initialization, so we can use the id to run and gather results.
120118 try (Connection conn = ci.getConnection()) {
119+
120+ // First of all do a compatibility check and fail-fast
121+ checkFrameworkCompatibility(conn);
122+
121123 for (ReporterOptions ro : reporterOptionsList) {
122124 Reporter reporter = ReporterFactory.createReporter(ro.getReporterName());
123125 reporter.init(conn);
@@ -212,11 +214,16 @@ public List<ReporterOptions> getReporterOptionsList() {
212214 return reporterOptionsList;
213215 }
214216
215- private void checkFrameworkCompatibility(ConnectionInfo ci) throws SQLException {
217+ /** Checks whether cli is compatible with the database framework
218+ *
219+ * @param conn Active Connection
220+ * @throws SQLException
221+ */
222+ private void checkFrameworkCompatibility(Connection conn) throws SQLException {
216223
217224 if ( !skipCompatibilityCheck ) {
218225 try {
219- DBHelper.failOnVersionCompatibilityCheckFailed(ci.getConnection() );
226+ DBHelper.failOnVersionCompatibilityCheckFailed(conn );
220227 } catch (DatabaseNotCompatibleException e) {
221228 System.out.println(e.getMessage());
222229
0 commit comments