[TYPO3-core] RFC #16333: Bug: Make scheduler's execution class fully testable
Marcus Krause
marcus#exp2010 at t3sec.info
Wed Nov 10 17:48:04 CET 2010
Hi!
Another scheduler issue.
This is a SVN patch request.
Type: feature/performance
Bugtracker reference:
http://bugs.typo3.org/view.php?id=16333
Branches:
4-4, trunk
Problem:
Class tx_scheduler_Execution uses current timestamp as basis for
execution calculations . This makes it hard to write testcases for this
class. Those should ideally work with a fixed date to get simple
expected results for testcases.
Solution:
Use global EXEC_TIME by default (set in constructor) and add
getter/setter to modify the time (for unit test usage).
Note:
Using global EXEC_TIME instead of several time() function calls should
even have an positive performance impact.
I'd love to see it committed to 4-4 besides to trunk. Think of performance.
Patch was made against trunk.
Marcus.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16333.diff
Type: text/x-diff
Size: 2236 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101110/b2e5f84d/attachment.diff>
More information about the TYPO3-team-core
mailing list