-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Move acceptance tests that crash the PHP built-in server to Apache #12104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move acceptance tests that crash the PHP built-in server to Apache #12104
Conversation
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
MorrisJobke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a nice plan 👍
|
|
In order to run the acceptance tests in Apache "/var/www/html" has to be linked to the root directory of the Nextcloud server. Before this was automatically done when launching the acceptance tests through "./run.sh", but an explicit command was needed when run in Drone. Now the linking was moved from "run.sh" to "run-local.sh", so it is automatically done when run through "./run.sh" and in Drone, including when running the tests for an app instead of for the server. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The PHP built-in server can crash when certain actions are performed in Nextcloud (but although the crash is triggered by Nextcloud it does not seem to be a Nextcloud bug), which can lead to failures in the acceptance tests that would have otherwise passed. A crash of the PHP built-in server during an acceptance test can be identified by the message "sh: 1: kill: No such process" in the acceptance tests output; as the PHP built-in server crashed its process does no longer exist when it is tried to be killed when the scenario ends. Although the crash has been observed in other tests too it is more prevalent in the tests for tags and the theming app. In order to reduce the false positives those tests are now run on Apache instead of on the PHP built-in sever. However, the rest of tests are still run on the PHP built-in server due to its lower resource consumption. In order to run a feature or just a scenario using Apache it has to be tagged with "@apache"; features or scenarios without that tag (the default) will run on the PHP built-in server instead. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
99b2489 to
565556b
Compare
Silly me, I forgot to follow my own instructions and link the server directory to /var/www/html/ in Drone 🤦♂️ Anyway, I did something even better and now it will be automatically done also for Drone, no need for an explicit command any more ;-) |
|
IT IS GREEEN! |
The PHP built-in server can crash when certain actions are performed in Nextcloud (but although the crash is triggered by Nextcloud it does not seem to be a Nextcloud bug), which can lead to failures in the acceptance tests that would have otherwise passed.
A crash of the PHP built-in server during an acceptance test can be identified by the message
sh: 1: kill: No such processin the acceptance tests output; as the PHP built-in server crashed its process does no longer exist when it is tried to be killed when the scenario ends.Although the crash has been observed in other tests too it is more prevalent in the tests for tags and the theming app. In order to reduce the false positives (I could not stand them any longer :-P ) those tests are now run on Apache instead of on the PHP built-in sever. However, the rest of tests are still run on the PHP built-in server due to its lower resource consumption*.
In order to run a feature or just a scenario using Apache it has to be tagged with
@apache; features or scenarios without that tag (the default) will run on the PHP built-in server instead.*I assume that Apache requires more resources than the PHP built-in server due to its higher complexity; of course it could be better optimized too and have a lower resource consumption in the end, but based on a quick test (far from a scientific, peer reviewed test :-P ) the PHP built-in server is lighter than Apache. Drone is loaded enough already, so I would run an acceptance test on Apache only when strictly necessary.