From 021c153886ff3a5a63aaaf36b1c4e30bdcb2a70c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Sun, 28 Oct 2018 19:51:13 +0100 Subject: [PATCH] Move acceptance tests that crash the PHP built-in server to Apache MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tests/acceptance/config/behat.yml | 28 +++++++++++++++++++ .../features/app-files-tags.feature | 1 + tests/acceptance/features/app-theming.feature | 1 + 3 files changed, 30 insertions(+) diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index e1248e18a81..d1489a00864 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -23,6 +23,34 @@ default: - SettingsMenuContext - ThemingAppContext - UsersSettingsContext + filters: + tags: "~@apache" + apache: + paths: + - %paths.base%/../features + contexts: + - ActorContext + - NextcloudTestServerContext: + nextcloudTestServerHelper: NextcloudTestServerLocalApacheHelper + + - AppNavigationContext + - AppSettingsContext + - AppsManagementContext + - CommentsAppContext + - ContactsMenuContext + - DialogContext + - FeatureContext + - FileListContext + - FilesAppContext + - FilesSharingAppContext + - LoginPageContext + - NotificationContext + - SettingsContext + - SettingsMenuContext + - ThemingAppContext + - UsersSettingsContext + filters: + tags: "@apache" extensions: Behat\MinkExtension: sessions: diff --git a/tests/acceptance/features/app-files-tags.feature b/tests/acceptance/features/app-files-tags.feature index 993c505b739..3da24b7e1c2 100644 --- a/tests/acceptance/features/app-files-tags.feature +++ b/tests/acceptance/features/app-files-tags.feature @@ -1,3 +1,4 @@ +@apache Feature: app-files-tags Scenario: show the input field for tags in the details view diff --git a/tests/acceptance/features/app-theming.feature b/tests/acceptance/features/app-theming.feature index 268b9a04a2f..01c7d8df8dd 100644 --- a/tests/acceptance/features/app-theming.feature +++ b/tests/acceptance/features/app-theming.feature @@ -1,3 +1,4 @@ +@apache Feature: app-theming Scenario: changing the color updates the header color -- 2.39.5