Bug #4172
closedArchitecture #4159: Update java dependencies for Rudder 2.9
Tests failling since upgrade of jdbc driver
Description
Since upgrade of jdbc driver, one of our test is failing. autocommit is on, resulting in an error when calling commit method
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 1.339 sec <<< FAILURE! Running com.normation.rudder.migration.TestManageMigration_2_3 Tests run: 8, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.957 sec <<< FAILURE! Running com.normation.rudder.migration.TestDbMigration_2_3b Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.296 sec <<< FAILURE! Results : Tests in error: step(com.normation.rudder.migration.TestDbMigration_2_3): PSQLException: Cannot commit when autoCommit is enabled. Event Logs should::be all found(com.normation.rudder.migration.TestDbMigration_2_3): An Failure Box was opened. Failure Message: StatementCallback; bad SQL grammar [SELECT id, eventType, data FROM eventlog]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "eventlog" does not exist Event Logs should::be correctly migrated(com.normation.rudder.migration.TestDbMigration_2_3): StatementCallback; bad SQL grammar [select * from eventlog]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "eventlog" does not exist Migration of event logs from fileformat 2 to 3 should::not be launched if fileFormat is already 3(com.normation.rudder.migration.TestManageMigration_2_3): Cannot commit when autoCommit is enabled. Migration of event logs from fileformat 2 to 3 should::not be launched if fileFormat is higher than 3(com.normation.rudder.migration.TestManageMigration_2_3): Exception while executing statement : ERROR: relation "migrationeventlog" does not exist Migration of event logs from fileformat 2 to 3 should::not be launched if fileformat is negative(com.normation.rudder.migration.TestManageMigration_2_3): Exception while executing statement : ERROR: relation "migrationeventlog" does not exist Migration of event logs from fileformat 2 to 3 should::not be launched if fileformat is 0(com.normation.rudder.migration.TestManageMigration_2_3): Exception while executing statement : ERROR: relation "migrationeventlog" does not exist Migration of event logs from fileformat 2 to 3 should::not be launched if fileformat is 1(com.normation.rudder.migration.TestManageMigration_2_3): Exception while executing statement : ERROR: relation "migrationeventlog" does not exist Migration of event logs from fileformat 2 to 3 should::be launched if fileformat is 2\u002C event if marked finished(com.normation.rudder.migration.TestManageMigration_2_3): Exception while executing statement : ERROR: relation "migrationeventlog" does not exist Migration of event logs from fileformat 2 to 3 should::be launched if fileformat is 2(com.normation.rudder.migration.TestManageMigration_2_3): Exception while executing statement : ERROR: relation "migrationeventlog" does not exist step(com.normation.rudder.migration.TestDbMigration_2_3b): PSQLException: Cannot commit when autoCommit is enabled. Event Logs should::be all found(com.normation.rudder.migration.TestDbMigration_2_3b): Exception while executing statement : ERROR: relation "migrationeventlog" does not exist Event Logs should::be correctly migrated(com.normation.rudder.migration.TestDbMigration_2_3b): StatementCallback; bad SQL grammar [select * from eventlog]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "eventlog" does not exist
for valid those tests 2 solution : desactivate autocommit or remove call to commit method.
I don't knwo which one is better ...
Updated by Nicolas CHARLES about 11 years ago
I guess we should switch to autoCommit false.
In com/normation/rudder/repository/jdbc/SquerylConnectionProvider.scala, we have for ourTransaction
if(c.getAutoCommit) c.setAutoCommit(false)
Updated by Vincent MEMBRÉ about 11 years ago
- Status changed from New to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder/pull/374
desactivate autocommit : https://github.com/Normation/rudder/pull/374
Updated by Vincent MEMBRÉ about 11 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset 8b42564b2a689e2e0248517a487d65e785dd1512.
Updated by Nicolas CHARLES about 11 years ago
Applied in changeset 1017e3a6e42548ddf8b5dca8c8ce66fb2d622738.
Updated by Vincent MEMBRÉ about 11 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.9.0~rc1, which was released on Friday 13/12/2013.
Check out:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2013-December/000065.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog29
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Benoît PECCATTE almost 10 years ago
- Category changed from 40 to Architecture - Code maintenance