Project

General

Profile

Actions

Bug #4172

closed

Architecture #4159: Update java dependencies for Rudder 2.9

Tests failling since upgrade of jdbc driver

Added by Vincent MEMBRÉ about 11 years ago. Updated almost 10 years ago.

Status:
Released
Priority:
1 (highest)
Category:
Architecture - Code maintenance
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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 ...

Actions #1

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)
Actions #2

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
Actions #3

Updated by Vincent MEMBRÉ about 11 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #5

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:

Actions #6

Updated by Benoît PECCATTE almost 10 years ago

  • Category changed from 40 to Architecture - Code maintenance
Actions

Also available in: Atom PDF