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

Fix TestDocumentImport.fourStepsImport, randomly failing against PostgreSQL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CI/CD
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #18
    • Story Points:
      5

      Description

      Regression
      Run unit tests / Run postgresql unit tests / org.nuxeo.importer.stream.tests.importer.TestDocumentImport.fourStepsImport
      
      expected:<1000> but was:<410>
      Stacktrace
      java.lang.AssertionError: expected:<1000> but was:<410>
      	at org.junit.Assert.fail(Assert.java:89)
      	at org.junit.Assert.failNotEquals(Assert.java:835)
      	at org.junit.Assert.assertEquals(Assert.java:647)
      	at org.junit.Assert.assertEquals(Assert.java:633)
      	at org.nuxeo.importer.stream.tests.importer.TestDocumentImport.fourStepsImport(TestDocumentImport.java:176)
      

      With the PostgreSQL error:

      Caused by: java.sql.BatchUpdateException: Batch entry 0 INSERT INTO "hierarchy" ("id", "parentid", "pos", "name", "isproperty", "primarytype", "mixintypes", "ischeckedin", "baseversionid", "majorversion", "minorversion", "isversion", "isrecord", "retainuntil", "haslegalhold", "isretentionactive", "istrashed", "systemchangetoken", "changetoken") VALUES ('6d9fdde0-b179-4c0c-92b7-f2624164b6cf', '84876328-96e9-4e8e-9c12-4c77da0e3d99', NULL, 'doughs-tann', 'FALSE', 'File', NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0) was aborted: ERROR: duplicate key value violates unique constraint "hierarchy_unique_child"
        Detail: Key (parentid, name)=(84876328-96e9-4e8e-9c12-4c77da0e3d99, doughs-tann) already exists.  Call getNextException to see other errors in the batch.
      	at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:153) ~[postgresql-42.2.9.jar:42.2.9]
      	at org.postgresql.core.ResultHandlerDelegate.handleError(ResultHandlerDelegate.java:50) ~[postgresql-42.2.9.jar:42.2.9]
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2242) ~[postgresql-42.2.9.jar:42.2.9]
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:508) ~[postgresql-42.2.9.jar:42.2.9]
      	at org.postgresql.jdbc.PgStatement.internalExecuteBatch(PgStatement.java:850) ~[postgresql-42.2.9.jar:42.2.9]
      	at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:873) ~[postgresql-42.2.9.jar:42.2.9]
      	at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1562) ~[postgresql-42.2.9.jar:42.2.9]
      	at org.tranql.connector.jdbc.StatementHandle.executeBatch(StatementHandle.java:155) ~[tranql-connector-1.8.jar:1.8]
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:535) ~[classes/:?]
      	... 30 more
      Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "hierarchy_unique_child"
        Detail: Key (parentid, name)=(84876328-96e9-4e8e-9c12-4c77da0e3d99, doughs-tann) already exists.
      

      See attached output for more info.

      Seen hereĀ https://jenkins.platform.dev.nuxeo.com/job/nuxeo/job/nuxeo/job/master/634/.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: