From 3a75b754d0146fdd6043ad1619208177855e154d Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 18 Sep 2014 18:12:42 +0200 Subject: [PATCH] - add changelog entry for restart-crashed-nodes - fix a test which depended on dict ordering - minor test cleanups --- CHANGELOG | 5 +++++ testing/acceptance_test.py | 6 ++---- testing/test_dsession.py | 7 +++---- 3 files changed, 10 insertions(+), 8 deletions(-) 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)