Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-28527

Fix TestMongoDBIndices.shouldFailWhenCreatingExistingChildNameDocument on mongodb4

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10, 11.1
    • Fix Version/s: 10.10-HF21, 11.1, 2021.0
    • Component/s: Core MongoDB
    • Environment:
      Jenkins

      Description

      The TestMongoDBIndices.shouldFailWhenCreatingExistingChildNameDocument fails on MongoDB Jenkins Job [here|https://qa.nuxeo.org/jenkins/job/master/job/nuxeo-master-fullbuild-mongodb-4.0/404/testReport/org.nuxeo.ecm.core.mongodb/TestMongoDBIndices/shouldFailWhenCreatingExistingChildNameDocument/]

      The stack trace is:  

      2020-01-15 14:16:29,222 [main] WARN  [TransactionImpl] Unexpected exception from afterCompletion; continuing
      org.nuxeo.ecm.core.api.ConcurrentUpdateException: E11000 duplicate key error collection: dbce5c3c26365f.test index: ecm:parentId_1_ecm:name_1 dup key: { : "18e75a2f-ce6f-4a40-b319-a5b9f5254cfb", : "anyFile" }, null
      	at org.nuxeo.ecm.core.storage.mongodb.MongoDBRepository.createStates(MongoDBRepository.java:346) ~[nuxeo-core-storage-mongodb-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.storage.dbs.DBSTransactionState.save(DBSTransactionState.java:788) ~[nuxeo-core-storage-dbs-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.storage.dbs.DBSTransactionState.commit(DBSTransactionState.java:1015) ~[nuxeo-core-storage-dbs-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.storage.dbs.DBSSession.commit(DBSSession.java:236) ~[nuxeo-core-storage-dbs-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.ecm.core.storage.dbs.DBSRepositoryBase$TransactionContext.afterCompletion(DBSRepositoryBase.java:431) ~[nuxeo-core-storage-dbs-11.1-SNAPSHOT.jar:?]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.afterCompletion(TransactionImpl.java:540) [geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.afterCompletion(TransactionImpl.java:533) [geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:329) [geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252) [geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.commit(NuxeoContainer.java:538) [nuxeo-runtime-jtajca-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:393) [nuxeo-runtime-jtajca-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.runtime.test.runner.TransactionalFeature.nextTransaction(TransactionalFeature.java:95) [nuxeo-runtime-test-11.1-SNAPSHOT.jar:?]
      	at org.nuxeo.runtime.test.runner.TransactionalFeature.nextTransaction(TransactionalFeature.java:78) [nuxeo-runtime-test-11.1-SNAPSHOT.jar:?]
      

       

      The issue is that initially the test checks the expected exception basing on the mongodb:

      unittests

      but on Jenkins job the name of the DB can be different, its depends on the configured property 

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 4 hours
                  4h