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

Fix annotations tests on non-h2 database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.3
    • Component/s: Annotations, Tests

      Description

      These tests fail when run on non-h2 databases:

      • AnnotationServiceImplTest.testAddAnnotation
      • AnnotationsServiceTest.testAddAnnotation
      • AnnotatedEventListenerTest.testEventLister
      • AnnotationRepositoryTest.testAnnotateDocuments
      • AnnotationsOnVersionTest.testAnnotationsOnVersion
      • AnnotationsOnVersionTest.testAnnotationsOnRestore
      • AnnotationsOnVersionTest.testAnnotationsOnRestoreWithMultipleVersions
      • AnnotationsOnVersionTest.testDeleteAnnotationsOnVersions

      The issue is a failure of Jena to lock its database:

      com.hp.hpl.jena.db.RDFRDBException: Failed to lock database after 5 attempts. Try later or else call DriverRDB.unlockDB() after ensuring that no other Jena applications are using the database.
      	at com.hp.hpl.jena.db.impl.DriverRDB.lockDB(DriverRDB.java:924)
      	at com.hp.hpl.jena.db.impl.DriverRDB.getSystemSpecializedGraph(DriverRDB.java:296)
      	at com.hp.hpl.jena.db.DBConnection.containsModel(DBConnection.java:196)
      	at org.nuxeo.ecm.platform.relations.jena.JenaGraph.openGraph(JenaGraph.java:218)
      	at org.nuxeo.ecm.platform.relations.jena.JenaGraph.openGraph(JenaGraph.java:170)
      	at org.nuxeo.ecm.platform.relations.jena.JenaGraph.add(JenaGraph.java:496)
      	at org.nuxeo.ecm.platform.annotations.service.AnnotationsServiceImpl.addAnnotation(AnnotationsServiceImpl.java:86)
      	at org.nuxeo.ecm.platform.annotations.service.AnnotationsServiceImpl.addAnnotation(AnnotationsServiceImpl.java:76)
      	at org.nuxeo.ecm.platform.annotations.service.AnnotationServiceImplTest.testAddAnnotation(AnnotationServiceImplTest.java:47)
      

      https://qa.nuxeo.org/jenkins/job/nuxeo-master-fullbuild-part1-multidb-linux/1345/Slave=MULTIDB_LINUX,dbprofile=pgsql,jdk=java-8-oracle/testReport/junit/org.nuxeo.ecm.platform.annotations.service/AnnotationServiceImplTest/testAddAnnotation/

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: