Commit ef9fe5da authored by Jérome Perrin's avatar Jérome Perrin

testInvalidationBug: update after CMFActivity's node families

Test was failing because family mapping is loaded while connection is
already closed.

```
Traceback (most recent call last):
  File "erp5/Products/ERP5/tests/testInvalidationBug.py", line 156, in testLateInvalidationFromZEO
    activity_tool.tic()
  File "erp5/product/ERP5Type/tests/ProcessingNodeTestCase.py", line 96, in tic
    self._orig_tic(processing_node, force)
  File "erp5/product/CMFActivity/ActivityTool.py", line 1326, in tic
    node_family_id_set = self.getCurrentNodeFamilyIdSet()
  File "erp5/product/CMFActivity/ActivityTool.py", line 921, in getCurrentNodeFamilyIdSet
    return self._getNodeFamilyIdDict().get(getCurrentNode(), ())
  File "ZODB/Connection.py", line 909, in setstate
    self._setstate(obj, oid)
  File "ZODB/Connection.py", line 953, in _setstate
    p, serial = self._storage.load(oid, '')
  File "ZEO/ClientStorage.py", line 825, in load
    result = self.loadBefore(oid, m64)
  File "ZEO/ClientStorage.py", line 839, in loadBefore
    raise ClientDisconnected()
ClientDisconnected
```

Load the object explicitly before so that it's in cache.

/reviewed-on !881
parent 1e58e0c0
......@@ -102,6 +102,8 @@ class TestInvalidationBug(ERP5TypeTestCase):
"this unit test must be run with at least 2 ZEO clients"
### Prepare unit test, to minimize amount of work during critical section
## make sure activity tool's OOBTree for family mapping is loaded before the test
_ = activity_tool.getCurrentNodeFamilyIdSet()
## url to create some content using another zope
new_content_url = "http://ERP5TypeTestCase:@%s%s/Folder_create" % (
node_list[0], self.portal.organisation_module.getPath())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment