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.