diff --git a/CHANGELOG b/CHANGELOG index 4e20fce..fcd8fe9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,11 @@ pre-maturely (fixture teardown/setup is "nextitem" sensitive). Thanks to Andreas Pelme for bug analysis and failing test. +- restart crashed nodes by internally refactoring setup handling + of nodes. Also includes better code documentation. + Many thanks to Floris Bruynooghe for the complete PR. + + 1.10 ------------------------- diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 036e170..a2c262d 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -352,7 +352,7 @@ def test_teardownfails_one_function(testdir): @py.test.mark.xfail def test_terminate_on_hangingnode(testdir): p = testdir.makeconftest(""" - def pytest_sessionfinishes(session): + def pytest_sessionfinish(session): if session.nodeid == "my": # running on slave import time time.sleep(3) @@ -364,9 +364,7 @@ def test_terminate_on_hangingnode(testdir): ]) -# This test works when I reproduce it manually but hangs when running -# in the test suite. --flub -@pytest.mark.skipif(True, reason="Weird hang") +@pytest.mark.xfail(reason="works if run outside test suite", run=False) def test_session_hooks(testdir): testdir.makeconftest(""" import sys diff --git a/testing/test_dsession.py b/testing/test_dsession.py index 90ba45b..5b544d5 100644 --- a/testing/test_dsession.py +++ b/testing/test_dsession.py @@ -109,10 +109,9 @@ class TestLoadScheduling: def test_init_distribute_chunksize(self): sched = LoadScheduling(2) - node1 = MockNode() - node2 = MockNode() - sched.addnode(node1) - sched.addnode(node2) + sched.addnode(MockNode()) + sched.addnode(MockNode()) + node1, node2 = sched.nodes col = ["xyz"] * (6) sched.addnode_collection(node1, col) sched.addnode_collection(node2, col)