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

Fix RestESDocumentsTest.iCanPerformESQLPageProviderOnRepository systematic failure

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.x, 2021.4
    • Component/s: Tests
    • Tags:
    • Sprint:
      nxplatform #36
    • Story Points:
      3

      Description

      Context

      With MongoDB / ES / Kafka

      java.lang.AssertionError: expected:<20> but was:<19>
      	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.elasticsearch.test.rest.RestESDocumentsTest.iCanPerformESQLPageProviderOnRepository(RestESDocumentsTest.java:136)
      

      JSON response debug logw attached when OK/KO.
      We can reproduce locally against Mongi/ES/Kafka but only when running the whole nuxeo-elasticsearch-core module tests.

      Problem

      The issue was a remaining document from TestAutomaticIndexing#shouldIndexAfterPublishThenRestore which changed the PP result.
      After investigation, we've noticed that it was impossible to delete the working copy with MongoDB in the scenario described below:

      • publish a document under version 0.1
      • make a change to this document and version it to 0.2
      • restore version 0.1 to the document
      • delete the working the copy

      This scenario ended with this exception:

      org.nuxeo.ecm.core.api.DocumentExistsException: Cannot remove WORKING_COPY_ID, subdocument WORKING_COPY_ID is the target of proxy 0.1_PROXY_ID
      

      The issue was in the DBSSession#restoreVersion code which was restoring ecm:proxyIds whereas it shouldn't.

        Attachments

        1. ok.json
          39 kB
        2. ko.json
          37 kB
        3. TestAutomaticIndexingSync.log
          159 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: