test_timelyProcessExited is fragile and may not catch actual problems
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| @itamarst reported | |
|---|---|
| Trac ID | trac#5680 |
| Type | defect |
| Created | 2012-05-15 12:27:04Z |
| Branch | https://github.com/twisted/twisted/tree/process-test-5680 |
JP pointed out that test_timelyProcessExited in twisted.internet.test_process may fail without us noticing:
The problem is that the timeout support in runReactor is based on the IReactorTime implementation of the reactor it is running. It's quite likely that if the reactor is broken, instead of failing:
- the child will exit
- the reactor will not process the signal right away
- the timeout will elapse
- the reactor will wake up
- the signal will be processed, calling processEnded
- reactor.stop() will be called
- runReactor will notice the reactor was stopped and not raise a timeout exception
- the test will pass
Searchable metadata
trac-id__5680 5680
type__defect defect
reporter__itamar itamar
priority__normal normal
milestone__
branch__branches_process_test_5680 branches/process-test-5680
branch_author__itamar itamar
status__new new
resolution__None None
component__core core
keywords__
time__1337084824000000 1337084824000000
changetime__1338062326000000 1338062326000000
version__None None
owner__itamar itamar
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in twisted.internet.test_process at test_timelyProcessExited and read how runReactor handles IReactorTime timeouts. Reproduce or inspect the described child-exit and delayed-signal sequence, then make the test fail when the reactor does not process the signal promptly rather than accepting a late processEnded callback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100