-
Type: Task
-
Status: Resolved
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Tests
-
Tags:
-
Sprint:nxplatform #36
-
Story Points:3
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.
- Is referenced in