green icon indicating copy to clipboard operation
green copied to clipboard

Feature Request: unittest timeout

Open sodul opened this issue 4 years ago • 5 comments

We thrive to make our unittests very fast through proper targeting and mocking. Unfortunately once in a while a new "unittest" will take over 1m. We would like to capture that as part of our CI pipelines. We can probably parse the test results XML but I thought this could be a nice feature to have in green.

The timeout would not be for test suites but for individual tests.

sodul avatar Jun 09 '21 20:06 sodul

I'm not personally interested in this feature. If you (or anyone else) would like to attempt it, the place to start would be in poolRunner. I'd be happy to review the pull request.

CleanCut avatar Jun 12 '21 00:06 CleanCut

@CleanCut I'm considering spending some time to move this forward but since the code handling threads has conditional logic for backward compatibility with older versions of Python (at least it did when I looked into it in 2021), I would like to first refactor the existing code to simplify the logic and only support newer versions. Your test matrix currently includes 3.8, 3.9 and 3.10.

Would you be comfortable with me contributing a few PRs that only ensure support for these versions (and newer of course, like 3.11) ?

sodul avatar Apr 11 '23 22:04 sodul

Green currently supports Python 3.5+. I would prefer to not intentionally break support for older versions unless we find a good reason for it.

What if you gave it a try as-is, and then removed the support if it actually caused problems?

CleanCut avatar Apr 13 '23 23:04 CleanCut

I'm only considering removing code for python 2, if that's ok with you.

sodul avatar Apr 20 '23 22:04 sodul

I'm fine with removing the Python 2 code, now. We're ~3 years past it's official EOL.

CleanCut avatar Apr 21 '23 17:04 CleanCut