Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1370

Use a random string for the database name and user in PGSQL

    XMLWordPrintable

    Details

    • Type: Clean up
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 4.0.0
    • Component/s: Tests

      Description

      When a job is running and killed manually, starting another job or build will end on:

      [OSXSLAVE-DRIVE] [ERROR]       [sql] Failed to execute:  DROP DATABASE IF EXISTS "mac-drive-2"
      [OSXSLAVE-DRIVE] [ERROR] 
      [OSXSLAVE-DRIVE] BUILD FAILED - at 25/09/18 15:44
      [OSXSLAVE-DRIVE] /Users/jenkins/tmp/workspace/DRIVE-1254-type-annotations-xxx/sources/ftest/target-osxslave-drive/nuxeo-ftest.xml:1415: The following error occurred while executing this line:
      [OSXSLAVE-DRIVE] /Users/jenkins/tmp/workspace/DRIVE-1254-type-annotations-xxxx/sources/ftest/target-osxslave-drive/nuxeo-ftest.xml:957: org.postgresql.util.PSQLException: ERROR: database "mac-drive-2" is being accessed by other users
      [OSXSLAVE-DRIVE]   Détail : There is 1 other session using the database
      

      To bypass this behavior, there already exist a mechanism that generate random table name. It is not yet active because we setted NX_DB_xxx envars in slaves configuration.

      The Fix

      Simply unset NX_DB_NAME and NX_DB_USER envars in the tests.groovy Jenkinsfile before maven starts.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h