Commit Graph

31 Commits

Author SHA1 Message Date
Rajesh Taneja
fc2e137750 MDL-55174 core_testing: Use proper directory separator
While searching for existing files if directory
separator is not correct then original files
and directories will be deleted. So use DIRECTORY_SEPARATOR.
2016-07-15 13:51:41 +08:00
Rajesh Taneja
13708875d3 MDL-54573 testing: don't uppercase dbtype 2016-05-17 17:16:12 +08:00
Dan Poltawski
fc3d70d798 MDL-54573 testing: don't uppercase dbtype 2016-05-16 08:25:10 +01:00
Dan Poltawski
f6cbdf788a MDL-54573 testing: use dbtype rather dbvendor for diagnostics
So that we can differentiate between drivers
2016-05-13 14:49:42 +01:00
Rajesh Taneja
e891c8381e MDL-52502 behat: Ensure php web and cli version is same 2016-04-05 11:46:44 +08:00
Rajesh Taneja
af2dc48b41 MDL-52502 phpunit: Add php, db and os deatils 2016-04-05 11:46:43 +08:00
Rajesh Taneja
28dab6408c MDL-52799 unittest: Removed empty if statement 2016-01-18 15:47:07 +08:00
Rajesh Taneja
1226f3ca33 MDL-52799 phpunit: Truncate records for brokedmysql not empty. 2016-01-18 14:10:18 +08:00
Rajesh Taneja
e487a51db3 MDL-52060 phpunit: Keep track of modified database for reset
Keep list of modified tables, so they can be reset
without any guess work
2015-12-22 15:37:40 +08:00
Rajesh Taneja
22d55b3950 MDL-52060 phpunit: Check file only if needed 2015-12-22 13:19:06 +08:00
Rajesh Taneja
44121fbdc9 MDL-52060 phpunit: Keep track of initial reset sequence 2015-12-22 13:19:06 +08:00
Rajesh Taneja
97d0445a7b MDL-48302 behat: Make sure to clear php file cache 2014-11-21 10:22:56 +08:00
Andrew Nicols
3fa0daa90f MDL-47664 phpunit: Do not use sequence number changes for Oracle
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.
2014-10-17 13:28:46 +08:00
Petr Skoda
ddffa9d6d3 MDL-47538 phpunit: fix invalid PHPUNIT_SEQUENCE_START constant 2014-10-06 17:31:15 +13:00
Russell Smith
529495f7ce MDL-46193 phpunit: Use random starting value on initialization. 2014-07-04 16:33:13 +10:00
Russell Smith
fbb0c914b0 MDL-43835 phpunit: Create unique starting id's for sequences.
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.
2014-06-14 00:29:26 +10:00
Petr Skoda
a9236a2c3f MDL-45287 fix behat database reset between scenarios
We cannot find out if DB received any writes because behat
web access runs in different request.

This was affecting only scenarios without generators.
2014-04-28 17:02:58 +08:00
Petr Škoda
5d4c82560b MDL-44191 hack around MySQL 5.6 inability to lower auto_increment 2014-03-14 11:31:43 +08:00
Eloy Lafuente (stronk7)
630bb85d9e MDL-43266 testing: avoid assoc arrays for json
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.
2014-03-13 22:11:03 +01:00
David Monllao
d3daf24563 MDL-43266 testing: Removing duplicated keys 2014-03-12 17:49:55 +08:00
Jerome Mouneyrac
c78f19d153 MDL-43266 Testing sites are cleaning all test dataroot contents 2014-02-25 14:47:25 +08:00
David Monllao
244da9d1f8 MDL-43355 testing: Return the hash when HEAD points to a hash 2013-12-12 17:26:22 +08:00
David Monllao
7514c2f282 MDL-42842 testing: Generalization of the site info 2013-11-26 10:48:29 +08:00
Petr Škoda
c5701ce7d4 MDL-41086 rework detection of necessary upgrades 2013-08-08 21:11:40 +02:00
Petr Škoda
528a7b447a MDL-41017 improve purify caching
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
2013-08-03 11:31:18 +02:00
Petr Škoda
85b3806114 MDL-40545 add $CFG->localcachedir intended for local caching on cluster nodes 2013-07-20 14:10:25 +02:00
Petr Škoda
bd3b3bba9f MDL-40220 use new core_component::get_plugin_list() 2013-07-16 22:36:11 +02:00
Petr Škoda
46f6f7f224 MDL-40220 use new core_component::get_plugin_types() 2013-07-16 22:31:48 +02:00
David Monllao
b831d47925 MDL-37768 behat: Checking test site version before running tests 2013-02-08 17:14:26 +08:00
David Monllao
1150aeb896 MDL-37458 testing: Removing wrong comments 2013-01-23 13:23:08 +08:00
David Monllao
0ea35584ae MDL-37458 testing common methods generalization 2013-01-18 09:17:30 +08:00