Skip to content

Commit 8b7ec72

Browse files
authored
Merge branch 'main' into fail-container-ci
2 parents 7a9f715 + b356950 commit 8b7ec72

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

src/aiida/tools/pytest_fixtures/orm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def factory(label: str | None = None, configure: bool = True) -> 'Computer':
183183
computer.configure(
184184
key_filename=str(ssh_key),
185185
key_policy='AutoAddPolicy',
186+
safe_interval=1.0,
186187
)
187188

188189
return computer

tests/engine/test_memory_leaks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def test_leak_local_calcjob(aiida_code_installed):
6565

6666

6767
@pytest.mark.skipif(sys.version_info >= (3, 12), reason='Garbage collecting hangs on Python 3.12')
68-
@pytest.mark.nightly
6968
@pytest.mark.usefixtures('aiida_profile', 'check_memory_leaks')
7069
def test_leak_ssh_calcjob(aiida_computer_ssh):
7170
"""Test whether running a CalcJob over SSH leaks memory.

tests/tools/archive/orm/test_links.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
###########################################################################
99
"""orm links tests for the export and import routines"""
1010

11+
import pytest
12+
1113
from aiida import orm
1214
from aiida.common.links import LinkType
1315
from aiida.orm.entities import EntityTypes
1416
from aiida.tools.archive import ArchiveFormatSqlZip, create_archive, import_archive
1517
from tests.tools.archive.utils import get_all_node_links
1618

1719

18-
def test_links_to_unknown_nodes(tmp_path, aiida_profile):
20+
def test_links_to_unknown_nodes(tmp_path, aiida_profile_clean):
1921
"""Test importing of nodes, that have links to unknown nodes."""
2022
# store a node
2123
node = orm.Data()
@@ -46,7 +48,7 @@ def test_links_to_unknown_nodes(tmp_path, aiida_profile):
4648
with ArchiveFormatSqlZip().open(filename, 'r') as archive:
4749
assert archive.querybuilder().append(entity_type='link').count() == 1
4850

49-
aiida_profile.reset_storage()
51+
aiida_profile_clean.reset_storage()
5052

5153
# since the query builder only looks for links between known nodes,
5254
# this should not import the erroneous link
@@ -262,7 +264,8 @@ def test_complex_workflow_graph_links(aiida_profile_clean, tmp_path, aiida_local
262264
assert set(export_set) == set(import_set)
263265

264266

265-
def test_complex_workflow_graph_export_sets(aiida_profile, tmp_path, aiida_localhost_factory):
267+
@pytest.mark.nightly
268+
def test_complex_workflow_graph_export_sets(aiida_profile_clean, tmp_path, aiida_localhost_factory):
266269
"""Test ex-/import of individual nodes in complex graph"""
267270
for export_conf in range(0, 9):
268271
_, (export_node, export_target) = construct_complex_graph(aiida_localhost_factory, export_conf)
@@ -272,7 +275,7 @@ def test_complex_workflow_graph_export_sets(aiida_profile, tmp_path, aiida_local
272275
create_archive([export_node], filename=export_file, overwrite=True)
273276
export_node_str = str(export_node)
274277

275-
aiida_profile.reset_storage()
278+
aiida_profile_clean.reset_storage()
276279

277280
import_archive(export_file)
278281

@@ -296,7 +299,8 @@ def test_complex_workflow_graph_export_sets(aiida_profile, tmp_path, aiida_local
296299
)
297300

298301

299-
def test_high_level_workflow_links(aiida_profile, tmp_path, aiida_localhost_factory):
302+
@pytest.mark.nightly
303+
def test_high_level_workflow_links(aiida_profile_clean, tmp_path, aiida_localhost_factory):
300304
"""This test checks that all the needed links are correctly exported and imported.
301305
INPUT_CALC, INPUT_WORK, CALL_CALC, CALL_WORK, CREATE, and RETURN
302306
links connecting Data nodes and high-level Calculation and Workflow nodes:
@@ -318,7 +322,7 @@ def test_high_level_workflow_links(aiida_profile, tmp_path, aiida_localhost_fact
318322

319323
for calcs in high_level_calc_nodes:
320324
for works in high_level_work_nodes:
321-
aiida_profile.reset_storage()
325+
aiida_profile_clean.reset_storage()
322326

323327
graph_nodes, _ = construct_complex_graph(aiida_localhost_factory, calc_nodes=calcs, work_nodes=works)
324328

@@ -350,7 +354,7 @@ def test_high_level_workflow_links(aiida_profile, tmp_path, aiida_localhost_fact
350354
export_file = tmp_path.joinpath('export.aiida')
351355
create_archive(graph_nodes, filename=export_file, overwrite=True)
352356

353-
aiida_profile.reset_storage()
357+
aiida_profile_clean.reset_storage()
354358

355359
import_archive(export_file)
356360
import_links = get_all_node_links()
@@ -450,7 +454,8 @@ def link_flags_export_helper(name, all_nodes, tmp_path, nodes_to_export, flags,
450454
return ret
451455

452456

453-
def test_link_flags(aiida_profile, tmp_path, aiida_localhost_factory):
457+
@pytest.mark.nightly
458+
def test_link_flags(aiida_profile_clean, tmp_path, aiida_localhost_factory):
454459
"""Verify all link follow flags are working as intended.
455460
456461
Graph (from ``construct_complex_graph()``)::
@@ -584,10 +589,10 @@ def test_link_flags(aiida_profile, tmp_path, aiida_localhost_factory):
584589
),
585590
)
586591

587-
link_flags_import_helper(input_links_forward, aiida_profile.reset_storage)
588-
link_flags_import_helper(create_return_links_backward, aiida_profile.reset_storage)
589-
link_flags_import_helper(call_links_backward_calc1, aiida_profile.reset_storage)
590-
link_flags_import_helper(call_links_backward_work2, aiida_profile.reset_storage)
592+
link_flags_import_helper(input_links_forward, aiida_profile_clean.reset_storage)
593+
link_flags_import_helper(create_return_links_backward, aiida_profile_clean.reset_storage)
594+
link_flags_import_helper(call_links_backward_calc1, aiida_profile_clean.reset_storage)
595+
link_flags_import_helper(call_links_backward_work2, aiida_profile_clean.reset_storage)
591596

592597

593598
def test_double_return_links_for_workflows(tmp_path, aiida_profile_clean):

0 commit comments

Comments
 (0)