Skip to content

Commit 565556b

Browse files
committed
Move acceptance tests that crash the PHP built-in server to Apache
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 <danxuliu@gmail.com>
1 parent 34f397f commit 565556b

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

tests/acceptance/config/behat.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,34 @@ default:
2323
- SettingsMenuContext
2424
- ThemingAppContext
2525
- UsersSettingsContext
26+
filters:
27+
tags: "~@apache"
28+
apache:
29+
paths:
30+
- %paths.base%/../features
31+
contexts:
32+
- ActorContext
33+
- NextcloudTestServerContext:
34+
nextcloudTestServerHelper: NextcloudTestServerLocalApacheHelper
35+
36+
- AppNavigationContext
37+
- AppSettingsContext
38+
- AppsManagementContext
39+
- CommentsAppContext
40+
- ContactsMenuContext
41+
- DialogContext
42+
- FeatureContext
43+
- FileListContext
44+
- FilesAppContext
45+
- FilesSharingAppContext
46+
- LoginPageContext
47+
- NotificationContext
48+
- SettingsContext
49+
- SettingsMenuContext
50+
- ThemingAppContext
51+
- UsersSettingsContext
52+
filters:
53+
tags: "@apache"
2654
extensions:
2755
Behat\MinkExtension:
2856
sessions:

tests/acceptance/features/app-files-tags.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@apache
12
Feature: app-files-tags
23

34
Scenario: show the input field for tags in the details view

tests/acceptance/features/app-theming.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@apache
12
Feature: app-theming
23

34
Scenario: changing the color updates the header color

0 commit comments

Comments
 (0)