-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dependencies: Update requirements for
kiwipy
and plumpy
The new version `kiwipy==0.8` and `plumpy==0.22` provide compatiblity with newer versions of `aio-pika==8.0` which comes with various connection stability improvements. The only known problem is that `Communicator.close()` times out if at least one process has been run. A test is added to capture this behavior in `tests/manage/test_manager.py` which currently fails as a `TimeoutError` is thrown. A lot of debugging has not yet led to finding the cause nor a solution. Since this behavior only seems to be appearing in the tests and does not seem to affect regular usage, the upgrade is accepted regardless.
- Loading branch information
Showing
9 changed files
with
61 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""Tests for :mod:`aiida.manage.manager`.""" | ||
|
||
import pytest | ||
from aiida import engine, orm | ||
|
||
|
||
@engine.calcfunction | ||
def add_calcfunction(data): | ||
return orm.Int(data.value + 1) | ||
|
||
|
||
@pytest.mark.requires_rmq | ||
def test_disconnect(): | ||
"""Test the communicator disconnect. | ||
When the dependency ``kiwipy`` was updated to v0.8, it introduced a problem with shutting down the communicator. | ||
After at least one process would have been run, trying to disconnect the communcitor would time out. The problem | ||
is related to the update of the lower lying libraries ``aio-pika`` and ``aiormq`` to v9.4 and v6.8, respectively. | ||
After much painstaking debugging the cause could not be determined, nor a solution. This test is added to | ||
demonstrate the problematic behavior. Getting the communicator and then disconnecting it (through calling | ||
:meth:`aiida.manage.manager.Manager.reset_profile`) works fine. However, if a process is a run before closing it, | ||
for example running a calcfunction, the closing of the communicator will raise a ``TimeoutError``. | ||
""" | ||
from aiida.manage import get_manager | ||
|
||
manager = get_manager() | ||
manager.get_communicator() | ||
manager.reset_profile() # This returns just fine | ||
|
||
result, node = add_calcfunction.run_get_node(1) | ||
assert node.is_finished_ok | ||
assert result == 2 | ||
manager.reset_profile() # This hangs before timing out |