Closed enikao closed 3 months ago
Hi, I tried this on main branch, but I cannot reproduce the problem.
Looked at it with Niko, cannot reproduce it together either, so closing this.
I think this issue still exists.
Use branch lw-java/bulk-api and execute test TestRemoveReference.updateSingleNode()
Expected:
SerializedClassifierInstance{id='ID-4', parentNodeID='ID-3',
...
references=SerializedReferenceValue{metaPointer=MetaPointer{key='Folder-linked-key', version='2023.1', language='-default-key-FileSystem'}, value=[Entry{resolveInfo='null', reference='ID-10'}, Entry{resolveInfo='null', reference='ID-8'}]},
...
actual:
SerializedClassifierInstance{id='ID-4', parentNodeID='ID-3',
...
references=SerializedReferenceValue{metaPointer=MetaPointer{key='Folder-linked-key', version='2023.1', language='-default-key-FileSystem'}, value=[]},
...
Somehow opposite in TestChangePropertyValue.updateNode3()
:
expected:
SerializedClassifierInstance{id='ID-4', parentNodeID='ID-3',
...
references=SerializedReferenceValue{metaPointer=MetaPointer{key='Folder-linked-key', version='2023.1', language='-default-key-FileSystem'}, value=[]},
...
actual:
SerializedClassifierInstance{id='ID-4', parentNodeID='ID-3',
...
references=SerializedReferenceValue{metaPointer=MetaPointer{key='Folder-linked-key', version='2023.1', language='-default-key-FileSystem'}, value=[Entry{resolveInfo='null', reference='ID-10'}, Entry{resolveInfo='null', reference='ID-8'}]},
...
I cannot run the Java code, building the project fails. What I do see is that the file Disk-remove-reference-partition.json
you are using is actually the same as Disk_A.json, the references are still in the file. That is not how it was intended, but the expected result might then be different.
Can you try this again after removing the references from this file ?
I copied the json files from lw-repo/main. Now TestRemoveReference
works, but still one issue with TestChangePropertyValue.updateNode3()
:
expected:
SerializedClassifierInstance{id='ID-4', parentNodeID='ID-3',
...
references=,
...
actual:
SerializedClassifierInstance{id='ID-4', parentNodeID='ID-3',
...
references=SerializedReferenceValue{metaPointer=MetaPointer{key='Folder-linked-key', version='2023.1', language='-default-key-FileSystem'}, value=[Entry{resolveInfo='null', reference='ID-10'}, Entry{resolveInfo='null', reference='ID-8'}]},
...
This seens to be correct, because the two references are in DIsk_A
, and applying Disk_Property_value_changed-single-node.json
does not remove them. Theese two references are missing in the Disk_Property_value_changed-partition
json.
Did I introduce this issue during translation to Java or is the TS test missing the discrepancy?
In general the TS testcases check whether the retrieve is identical to the partition.json in the same folder, so this kind of discrepancy will not be found.
In this specific case the references are in the partition.json, so they have probably been changed after you copied them.
In the @lionweb/typescript
repo we use the testcases from https://github.com/LionWeb-io/lionweb-integration-testing
. These tests are not copied, but are checked out in a setup script. Although they are not automatically updated, it is easy to do a git clean + project setup to update them. Maybe such a setup would make it easier to keep things synchronized.
Closing because cannot reproduce it
Assume the repository contains Disk_A.json.
When we
store
Disk-move-child-partition.json, we expect nodeID-4
to have no references. It actually keeps the reference toID-10
.