9 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
02badbb0e6 MDL-32547 unit tests: Make tests match file_temp_cleanup_task impl.
While default value did not change from 7 days... there are subtle
differences between strtotime('-1 week') used in tests and
-(7*24**3600) used in implementation.

This just makes the unit test to follow the implementation by
using the new config setting.
2015-03-31 01:53:56 +02:00
Eloy Lafuente (stronk7)
68632b6d80 MDL-47572 unit tests: make cronlib_testcase DST immune
Disclaimer: I've assigned this commit to MDL-47572 because it's
the issue where I've seen related changes.

Since a couple of days ago, both CI servers were failing. A couple
of days ago it was DST change in Europe/Madrid (that is the PHP
default TZ used by them).

Tests pass perfectly if the TZ is set to any other place not affected
by DST (Australia/Perth, for example).

Really the issue is a wrong mix of functions supporting DST and
functions not supporting them.

But, with current implementation (checking +-60 seconds around a time)
and with a DST change in the middle... this unit tests was going to be
failing for an entire week. And that's not acceptable for CIs.

So, I've changed the intervals, to be bigger than 1h (exactly 1h1s), so
they will be immune to the DST change/partial support.

Ideally all operations should be working in the same way (with or
without DST considered), but that's out from the scope of getting this
test stable enough and passing.
2015-03-31 01:21:18 +02:00
Marina Glancy
54f7d2d7f4 MDL-47572 libraries: modify unittest to avoid random timing fail
Thanks to Nigel Cunningham
2014-10-08 11:32:10 +08:00
Damyon Wiese
3f86b023ef MDL-45654 Cron: Fix for unit test that was causing integer overflow in 32 bit php 2014-05-29 12:10:19 +08:00
Sam Hemelryk
20f29d2c89 MDL-45654 cron: fixed dataprovider timestamp issue 2014-05-29 11:53:36 +12:00
Rod Norfor
75b70ab6cd MDL-45654 cron: fix non-empty directories deletion
Remove errors when attempting to delete non-empty directories when
child directories do not get removed since the mtime was updated when
files were removed from the child directory.
2014-05-21 17:15:30 +01:00
Damyon Wiese
309ae8921f MDL-25499: Centralise management of all types of cron tasks
Centralise management of all types of cron tasks with registration, scheduling,
parallel task conflicts(blocking) and running once off tasks, all using an
administration screen.

This is a combination of several issues:

MDL-25502: Added "black magic" task allocator for cron
MDL-25503: Add step to cron to run all scheduled tasks
MDL-25504 cron: Refactor to use scheduler
MDL-25505: Add an admin interface to schedule tasks via cron.
MDL-25507: Add support for adhoc tasks.
2014-02-26 12:03:46 +08:00
Tim Gus
c4012e7e82 MDL-38570 admin: fix cron_delete_from_temp on windows 2013-09-12 11:33:32 +08:00
Tim Gus
179961e8a4 MDL-38570 administration: Temporary file deletion
Added new function "cron_delete_from_temp" to delete old files and
directories under $CFG->tempdir during cron run. Unit test included.
2013-09-04 13:48:01 -04:00