The UI tests of this plugin are also running in our core builds. There it happens quite often that the UI tests are failing as additional error message occur in the log files, as e.g. there is a temporary error while generating the assets.
This happens, as the UI tests currently overwrite the log file position, with a file specially created for tests. New log entries are therefor directly written to the file and the UI tests display them.
This PR changes the behavior, so the log file position actually isn't overwritten, but the ReaderFactory in this plugin responsible for reading the log file use the customized path for reading only. That way no new messages can appear in the tests.
In addition I've also speeded the tests up ab bit by adding a nearly empty fixture, that will be used in the UI tests. Using the default fixture works as well, but takes a lot longer to be set up.
[ ] Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
[ ] Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
Description:
The UI tests of this plugin are also running in our core builds. There it happens quite often that the UI tests are failing as additional error message occur in the log files, as e.g. there is a temporary error while generating the assets.
This happens, as the UI tests currently overwrite the log file position, with a file specially created for tests. New log entries are therefor directly written to the file and the UI tests display them. This PR changes the behavior, so the log file position actually isn't overwritten, but the ReaderFactory in this plugin responsible for reading the log file use the customized path for reading only. That way no new messages can appear in the tests.
In addition I've also speeded the tests up ab bit by adding a nearly empty fixture, that will be used in the UI tests. Using the default fixture works as well, but takes a lot longer to be set up.
Review