Skip to content
This repository was archived by the owner on Nov 2, 2018. It is now read-only.
This repository was archived by the owner on Nov 2, 2018. It is now read-only.

test_tornado's test_execute_async flaky #105

Description

@chantra

It seems this test may be flaky given that it succeeded on all other python flavors.
https://travis-ci.org/facebook/sparts/jobs/119671018

tests/tasks/test_settaskoption.py ..
tests/tasks/test_tornado.py .
=================================== FAILURES ===================================
________________________ TestMyTask.test_execute_async _________________________
self = <tests.tasks.test_periodic.TestMyTask testMethod=test_execute_async>
    def test_execute_async(self):
        f = self.task.execute_async()
        res = f.result(3.0)
        self.assertNotNone(res)
        self.assertGreater(res, 0)

        # Verify exception path
        self.task.fail_async = True
        with self.assertRaises(Exception) as ctx:
            # Call this twice, since there's a race condition where setting
            # fail_async and getting the future from execute_async is called
            # when execute is between the self.fail_async check and the return
            self.task.execute_async().result(1.0)
>           self.task.execute_async().result(1.0)
E           AssertionError: Exception not raised
tests/tasks/test_periodic.py:60: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions