You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a feature request, and may be similar to issues #1 and #6, but I feel the scope may be different then the resolutions mentioned there.
I have found that I receive errors, or have the potential for inconsistent results if I am running multiple instances concurrently, or if previous tests failed. Specifically, I am seeing that certain file names are being reused for multiple tests. Some example names include:
As you could suspect from the directory, on my system the temp directory is set globally to /tmp, which means that if two different users attempt to run the tests at the same time, it fails because of user permissions issues. The symptoms may not be important for most people, as they are likely using only a single user to run the tests on a given machine. However, as I have seen those files remaining after certain runs, perhaps after a failed run, I had suspected that they might cause problems if they remain until the next run for that same user.
In my environments, I am running the scripts directly on certain servers which will be hosting WordPress with the intention of having more accurate results.
If this is a problem, I would recommend adding some other information onto the file names, perhaps such as a hash value, or perhaps by adding in an ID for the run.
The text was updated successfully, but these errors were encountered:
The WordPress unit test suite uses get_temp_dir() to generate the temp directory path. get_temp_dir() respects the WP_TEMP_DIR constant, which you could set to a unique value for each test suite:
If you wanted to submit a pull request against the documentation (or the test runner, to have it handle this for you automatically), I'd be happy to review :)
This is more of a feature request, and may be similar to issues #1 and #6, but I feel the scope may be different then the resolutions mentioned there.
I have found that I receive errors, or have the potential for inconsistent results if I am running multiple instances concurrently, or if previous tests failed. Specifically, I am seeing that certain file names are being reused for multiple tests. Some example names include:
/tmp/waffles-300x225.jpg
/tmp/waffles.jpg
/tmp/canola.jpg
/tmp/canola-150x150.jpg
As you could suspect from the directory, on my system the temp directory is set globally to
/tmp
, which means that if two different users attempt to run the tests at the same time, it fails because of user permissions issues. The symptoms may not be important for most people, as they are likely using only a single user to run the tests on a given machine. However, as I have seen those files remaining after certain runs, perhaps after a failed run, I had suspected that they might cause problems if they remain until the next run for that same user.In my environments, I am running the scripts directly on certain servers which will be hosting WordPress with the intention of having more accurate results.
If this is a problem, I would recommend adding some other information onto the file names, perhaps such as a hash value, or perhaps by adding in an ID for the run.
The text was updated successfully, but these errors were encountered: