Skip to content

Conversation

@danxuliu
Copy link
Member

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 (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.

Copy link
Member

@MorrisJobke MorrisJobke left a 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 👍

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 29, 2018
@skjnldsv
Copy link
Member

skjnldsv commented Oct 29, 2018

User name field in Login page could not be found after 100 seconds (NoSuchElementException)

@MorrisJobke MorrisJobke added 2. developing Work in progress and removed 4. to release Ready to be released and/or waiting for tests to finish labels Oct 29, 2018
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]>
@danxuliu danxuliu force-pushed the move-acceptance-tests-that-crash-the-php-built-in-server-to-apache branch from 99b2489 to 565556b Compare October 29, 2018 12:19
@danxuliu
Copy link
Member Author

User name field in Login page could not be found after 100 seconds (NoSuchElementException)

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 ;-)

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Oct 29, 2018
@rullzer
Copy link
Member

rullzer commented Oct 29, 2018

IT IS GREEEN!

@rullzer rullzer merged commit 956bd19 into master Oct 29, 2018
@rullzer rullzer deleted the move-acceptance-tests-that-crash-the-php-built-in-server-to-apache branch October 29, 2018 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants