Project

General

Profile

Actions

Bug #25675

closed

Make scheduler's execution class fully testable

Added by Marcus Krause about 14 years ago. Updated almost 11 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2010-11-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

classtx_scheduler_Execution uses current timestamp as basis for execution calculations . This makes it hard to write testcases to this method. 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.

Note:
Using global EXEC_TIME instead of several time() function calls should even have an positive perfomance impact.

(issue imported from #M16333)

Actions #1

Updated by Marcus Krause about 14 years ago

v1 takes care that the configured timestamp is propagated to cronCmd instanciation

Actions #2

Updated by Marcus Krause about 14 years ago

adding unit tests for
a) that the constructor copies the timestamp from $GLOBALS['EXEC_TIME'];
b) that the setter sets the time

Actions #3

Updated by Susanne Moog over 13 years ago

  • Target version deleted (1088)
Actions #4

Updated by Mr. Hudson over 13 years ago

Patch set 1 of change I066c165cad985e5e99b46326b952f1affbe1072c has been pushed to the review server.
It is available at http://review.typo3.org/2482

Actions #5

Updated by Philipp Gampe over 12 years ago

This can be closed because the patch has been abandoned.

Actions #6

Updated by Francois Suter over 12 years ago

  • Status changed from Accepted to Rejected
  • Assignee deleted (Marcus Krause)
Actions #7

Updated by Michael Stucki almost 11 years ago

  • Category set to scheduler
Actions #8

Updated by Michael Stucki almost 11 years ago

  • Project changed from 739 to TYPO3 Core
  • Category changed from scheduler to scheduler
Actions

Also available in: Atom PDF