Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Lib/test/test_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,12 @@ def thread_function(num_objects):
NUM_OBJECTS = 1000
NUM_THREADS = 10

# 40 seconds should be enough for the test to be executed: if it
# is more than 40 seconds it means that the process is in deadlock
# hence the test fails
TIMEOUT = 40
# 160 seconds should be enough for the test to be executed: if it
# is more than 160 seconds it means that the process is in deadlock
# hence the test fails.
# The timeout is high because on older platforms it takes some time
# for the test to be executed when CPython is built with debug flags.
TIMEOUT = 160
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Consider adding @support.requires_resource("cpu") if this test can take a long time to run.
  2. You should use support.SHORT_TIMEOUT or support.LONG_TIMEOUT, which scales with --timeout, so it's longer on slow buildbots.

SHORT_TIMEOUT: It's 30 seconds for make test and anywhere from 60 seconds - 135 seconds on the three failing buildbots.

LONG_TIMEOUT: 10x SHORT_TIMEOUT.

If SHORT_TIMEOUT isn't enough, you should really consider making the test faster!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions. I've actually found a way to make it faster :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, let's see how it goes.


# Test the sys._current_frames and sys._current_exceptions calls
pid = os.fork()
Expand Down
Loading