The new setting will allow to host the temporary backup files
into a specific target directory. Defaults to '$CFG->tempdir/backup'.
Calling make_backup_temp_directory() checks that the required sub-directory
will be properly created under the new target directory.
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
purge_all() and purge_by_definition() look in the configuration
for which caches are available and then creates them to purge them.
The configuration stores the values used by initialise(), not
initialise_unit_test_instance() and would therefore fail to purge
all caches if they were not purged by another means.
In the case of filestore, it's purged by unit tests, in the case
of memcache(d), it purges the whole store when a single definition
is requested.
Therefore all configuration was moved into the configuration file
during unit tests and does not have any special override codes in
the unit test infrastructure.
Delete tablesupdatedbyscenario before db reset to ensure
db is fully reset. In case user exits or process terminated
then the file will be left and can lead to wrong results
While searching for existing files if directory
separator is not correct then original files
and directories will be deleted. So use DIRECTORY_SEPARATOR.
1. Create behat datadir within behat_dataroot not at same level
2. Define suffix for link and not use hard-coded values
3. Renamed ns_parallel to run.php
4. Rename variables to best understand them
5. Added support for each run to specify db, prefix, rerun and profile.
6. Showing number of steps in each line of parallel run.
When resetting a sequence number, we call change_database_structure()
which in turns clears the MUC cache for databasemeta. This cache contains
information about the table, columns, etc.
After the cache is cleared, it must be re-filled, and it was discovered
that the get_columns() code which fills this cache can take a particularly
long time. Given that this is called for every table in Moodle, this can
add up to a significant period, and this is done on a per-testsuite basis.
On my SSD install this was taking approximately 40 seconds on each re-fill
of the cache.
When all starting autoincrement ids are the same, it's difficult to detect coding and testing
errors that use the incorrect id in test calls. The classic case is cmid vs instance id.
To reduce the chance of the coding error we start sequences at different values where possible.
OUBlog installation is the case that highlighted this as it inserts a sitewide course module
at install time and cmid <> instance id in most cases.
Last commit switched from raw arrays to associative
arrays. That leads to json_encode() to generate an
object instead of an array, ultimately leading to
problems with the rest of code expecting an array.
By using array_values() we are moving back to the
non-associative array.
Also, fix some file permissions.
The improvements include:
* HTMLPurifier cache is stored in localcachedir
* allowobjectembed changes are not ignored any more
* the cache keys include revision and all options which makes
this suitable for local caches on cluster nodes
* unchanged test is replaced by "true" value which should
significantly improve performance
* removal of purge_all_caches() hack for directory recreation
* comments and coding style cleanup
Better performance, more reliable, completely self contained,
more validation and full backwards compatibility.
This will also allow us to implement ignoring of plugins.
Nasty strings includes html entities and
non-breaking spaces followed by spaces which makes
very hard to find these strings in the DOM html,
this patch keeps the non-breaking spaces and all
the nasty characters, but leaves them isolated from
other regular spaces. It swaps the strings to HTML before
finding elements in the HTML that matches that contents.