Open
Description
SQLite has a relatively strict anomaly testing that we should ensure is covered in the Data Liberation plugin.
Out-Of-Memory Testing
- Test with default memory limit (128 MB). Alert the user if the value is lower before importing.
- Randomly set
ini_set('memory_limit', '_a_small_one_M');
to simulate an OOM in one of theWP_Stream_Importer::next_step()
and see if the system can recover.
I/O Error Testing
- Simulate errors for
copy()
and other FS functions or useWP_Filesystem_Direct
as a base for the plugin and create a testing class that generates errors at random. - Test rogue files such as zip bomb
Crash Testing
- Trigger a fatal error like calling
non_existent_function();
in the middle of an import and try to restart it from that point.
Compound failure tests
- Stack 2, 3, 4 of the above errors in the same test run.