Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make build less flaky #34

Closed
rinslow opened this issue Dec 29, 2017 · 1 comment
Closed

Make build less flaky #34

rinslow opened this issue Dec 29, 2017 · 1 comment

Comments

@rinslow
Copy link
Contributor

rinslow commented Dec 29, 2017

A successful build will fail every now and then for multiprocess reasons.
Here's a helpful traceback:

================================== FAILURES ===================================
____ TestMultiprocessTimeouts.test_suite_continues_after_teardown_timeout _____
self = <tests.core.multiprocess.test_timeout.TestMultiprocessTimeouts testMethod=test_suite_continues_after_teardown_timeout>
    def test_suite_continues_after_teardown_timeout(self):
        """Test that tests continue to run after a case is killed in tearDown.
    
            * Create a suite composed of a case which gets timeout during tearDown
                and a case which run successfully.
            * Validate that the first case was killed in time.
            * Validate that the second case was run.
            """
        TearDownTimeoutCase.pid_queue = self.pid_queue
        TearDownTimeoutCase.post_timeout_event = self.post_timeout_event
    
        BasicMultiprocessCase.pid_queue = self.pid_queue
        BasicMultiprocessCase.post_timeout_event = self.post_timeout_event
    
        MockSuite1.components = (TearDownTimeoutCase,)
        MockSuite2.components = (BasicMultiprocessCase,)
    
        MockTestSuite.components = (MockSuite1, MockSuite2)
    
        self.runner.run(MockTestSuite)
    
        self.assertFalse(self.post_timeout_event.is_set(),
                         "Process continued when it should have been "
                         "terminated due to timeout")
    
>       self.validate_test_processes(2)
tests\core\multiprocess\test_timeout.py:133: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\core\multiprocess\test_runner.py:70: in validate_test_processes
    "Process %s wasn't killed" % pid)
E   AssertionError: Process 2052 wasn't killed
_________ TestMultiprocessTimeouts.test_suite_continues_after_timeout _________
self = <tests.core.multiprocess.test_timeout.TestMultiprocessTimeouts testMethod=test_suite_continues_after_timeout>
    def test_suite_continues_after_timeout(self):
        """Test that a test suite continues to run after a case is killed.
    
            * Create a suite composed of a case which gets timeout and a case which
                  run successfully.
            * Validate that the first case was killed in time.
            * Validate that the second case was run.
            """
        TimeoutCase.pid_queue = self.pid_queue
        TimeoutCase.post_timeout_event = self.post_timeout_event
    
        BasicMultiprocessCase.pid_queue = self.pid_queue
        BasicMultiprocessCase.post_timeout_event = self.post_timeout_event
    
        MockSuite1.components = (TimeoutCase,)
        MockSuite2.components = (BasicMultiprocessCase,)
    
        MockTestSuite.components = (MockSuite1, MockSuite2)
    
        self.runner.run(MockTestSuite)
    
        self.assertFalse(self.post_timeout_event.is_set(),
                         "Process continued when it should have been "
                         "terminated due to timeout")
    
>       self.validate_test_processes(2)
tests\core\multiprocess\test_timeout.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\core\multiprocess\test_runner.py:70: in validate_test_processes
    "Process %s wasn't killed" % pid)
E   AssertionError: Process 652 wasn't killed
======== 2 failed, 202 passed, 3 skipped, 4 warnings in 279.36 seconds ========
ERROR: InvocationError: 'C:\\projects\\rotest\\.tox\\py27-win32\\Scripts\\pytest.EXE tests
@gregoil
Copy link
Owner

gregoil commented Oct 30, 2018

@osherdp osherdp closed this as completed Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants