Skip to content
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

[tests-only] Run acceptance tests with postgres:9.4 #38060

Closed
wants to merge 3 commits into from

Conversation

phil-davis
Copy link
Contributor

followup of #37962 to see how it goes

@phil-davis phil-davis self-assigned this Oct 30, 2020
@phil-davis phil-davis force-pushed the test-on-postgres-9-4-20201030 branch from 9e4a577 to d481530 Compare November 3, 2020 05:32
@phil-davis
Copy link
Contributor Author

https://drone.owncloud.com/owncloud/core/27449/150/15
1 scenario consistently fails:

  Scenario: deleting the last one of multiple shared locks on the webUI                                                            # /drone/src/tests/acceptance/features/webUIWebdavLocks/unlock.feature:192
    Given these users have been created with skeleton files:                                                                       # FeatureContext::theseUsersHaveBeenCreated()
      | username  |
      | receiver1 |
      | receiver2 |
    And the user has created folder "/FOLDER_TO_SHARE"                                                                             # FeatureContext::theUserHasCreatedFolder()
    And user "brand-new-user" has shared file "/lorem.txt" with user "receiver1"                                                   # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    And user "brand-new-user" has shared folder "/FOLDER_TO_SHARE" with user "receiver1"                                           # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    And user "brand-new-user" has shared file "/lorem.txt" with user "receiver2"                                                   # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    And user "brand-new-user" has shared folder "/FOLDER_TO_SHARE" with user "receiver2"                                           # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    And user "receiver1" has locked file "lorem (2).txt" setting following properties                                              # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "receiver1" has locked folder "FOLDER_TO_SHARE" setting following properties                                          # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "receiver2" has locked file "lorem (2).txt" setting following properties                                              # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "receiver2" has locked folder "FOLDER_TO_SHARE" setting following properties                                          # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "brand-new-user" has locked file "lorem.txt" setting following properties                                             # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "brand-new-user" has locked folder "FOLDER_TO_SHARE" setting following properties                                     # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And the user has browsed to the files page                                                                                     # WebUIFilesContext::theUserBrowsesToTheFilesPage()
    When the user unlocks the lock no 3 of file "lorem.txt" on the webUI                                                           # WebUIWebDavLockingContext::unlockFileOnTheWebui()
    Then file "lorem.txt" should be marked as locked on the webUI                                                                  # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedOnTheWebui()
    And file "lorem.txt" should be marked as locked by user "receiver1" in the locks tab of the details panel on the webUI         # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedByUserInLocksTab()
      element click intercepted: Element <span class="icon icon-lock-closed"></span> is not clickable at point (674, 841). Other element would receive the click: <div id="notification" style="display: inline-block;">...</div>
        (Session info: chrome=74.0.3729.169)
        (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.15.0-122-generic x86_64) (Exception)
    And file "lorem.txt" should be marked as locked by user "receiver2" in the locks tab of the details panel on the webUI         # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedByUserInLocksTab()
    And 2 locks should be reported for file "lorem.txt" of user "brand-new-user" by the WebDAV API                                 # WebDavLockingContext::numberOfLockShouldBeReported()
    And 2 locks should be reported for file "lorem (2).txt" of user "receiver1" by the WebDAV API                                  # WebDavLockingContext::numberOfLockShouldBeReported()
    And 2 locks should be reported for file "lorem (2).txt" of user "receiver2" by the WebDAV API                                  # WebDavLockingContext::numberOfLockShouldBeReported()
    When the user unlocks the lock no 3 of folder "FOLDER_TO_SHARE" on the webUI                                                   # WebUIWebDavLockingContext::unlockFileOnTheWebui()
    Then folder "FOLDER_TO_SHARE" should be marked as locked on the webUI                                                          # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedOnTheWebui()
    And folder "FOLDER_TO_SHARE" should be marked as locked by user "receiver1" in the locks tab of the details panel on the webUI # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedByUserInLocksTab()
    And folder "FOLDER_TO_SHARE" should be marked as locked by user "receiver2" in the locks tab of the details panel on the webUI # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedByUserInLocksTab()
    And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "brand-new-user" by the WebDAV API                         # WebDavLockingContext::numberOfLockShouldBeReported()
    And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "receiver1" by the WebDAV API                              # WebDavLockingContext::numberOfLockShouldBeReported()
    And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "receiver2" by the WebDAV API                              # WebDavLockingContext::numberOfLockShouldBeReported()
SCENARIO RESULT: (fail)

--- Failed scenarios:

    /drone/src/tests/acceptance/features/webUIWebdavLocks/unlock.feature:192

I suspect that the order of results in PostgreSQL is often different to the other databases, so maybe the lock is in a different part of the display and is obscured by a notification.

@phil-davis phil-davis force-pushed the test-on-postgres-9-4-20201030 branch from d481530 to c8dae0c Compare November 5, 2020 08:28
@phil-davis
Copy link
Contributor Author

phil-davis commented Nov 5, 2020

Now we get:

  Scenario: deleting the last one of multiple shared locks on the webUI                                                            # /drone/src/tests/acceptance/features/webUIWebdavLocks/unlock.feature:192
    Given these users have been created with skeleton files:                                                                       # FeatureContext::theseUsersHaveBeenCreated()
      | username  |
      | receiver1 |
      | receiver2 |
    And the user has created folder "/FOLDER_TO_SHARE"                                                                             # FeatureContext::theUserHasCreatedFolder()
    And user "brand-new-user" has shared file "/lorem.txt" with user "receiver1"                                                   # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    And user "brand-new-user" has shared folder "/FOLDER_TO_SHARE" with user "receiver1"                                           # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    And user "brand-new-user" has shared file "/lorem.txt" with user "receiver2"                                                   # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    And user "brand-new-user" has shared folder "/FOLDER_TO_SHARE" with user "receiver2"                                           # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    And user "receiver1" has locked file "lorem (2).txt" setting following properties                                              # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "receiver1" has locked folder "FOLDER_TO_SHARE" setting following properties                                          # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "receiver2" has locked file "lorem (2).txt" setting following properties                                              # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "receiver2" has locked folder "FOLDER_TO_SHARE" setting following properties                                          # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "brand-new-user" has locked file "lorem.txt" setting following properties                                             # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And user "brand-new-user" has locked folder "FOLDER_TO_SHARE" setting following properties                                     # WebDavLockingContext::userHasLockedFile()
      | lockscope | shared |
    And the user has browsed to the files page                                                                                     # WebUIFilesContext::theUserBrowsesToTheFilesPage()
    When the user unlocks the lock no 3 of file "lorem.txt" on the webUI                                                           # WebUIWebDavLockingContext::unlockFileOnTheWebui()
    And the user dismisses all notifications on the webUI                                                                          # WebUIGeneralContext::theUserDismissesAllNotificationsOnTheWebUI()
      │ dismissAllNotifications: found 1 notifications to dismiss
      │ dismissAllNotifications: dismissing 'Could not unlock, please contact the lock owner receiver1'
      │ 
    Then file "lorem.txt" should be marked as locked on the webUI                                                                  # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedOnTheWebui()
    And the user dismisses all notifications on the webUI                                                                          # WebUIGeneralContext::theUserDismissesAllNotificationsOnTheWebUI()
      │ dismissAllNotifications: found 0 notifications to dismiss
      │ 
    And file "lorem.txt" should be marked as locked by user "receiver1" in the locks tab of the details panel on the webUI         # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedByUserInLocksTab()
    And the user dismisses all notifications on the webUI                                                                          # WebUIGeneralContext::theUserDismissesAllNotificationsOnTheWebUI()
      │ dismissAllNotifications: found 0 notifications to dismiss
      │ 
    And file "lorem.txt" should be marked as locked by user "receiver2" in the locks tab of the details panel on the webUI         # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedByUserInLocksTab()
    And 2 locks should be reported for file "lorem.txt" of user "brand-new-user" by the WebDAV API                                 # WebDavLockingContext::numberOfLockShouldBeReported()
      expected 2 lock(s) for 'lorem.txt' but found 3
      Failed asserting that actual size 3 matches expected size 2.
    And 2 locks should be reported for file "lorem (2).txt" of user "receiver1" by the WebDAV API                                  # WebDavLockingContext::numberOfLockShouldBeReported()
    And 2 locks should be reported for file "lorem (2).txt" of user "receiver2" by the WebDAV API                                  # WebDavLockingContext::numberOfLockShouldBeReported()
    When the user unlocks the lock no 3 of folder "FOLDER_TO_SHARE" on the webUI                                                   # WebUIWebDavLockingContext::unlockFileOnTheWebui()
    And the user dismisses all notifications on the webUI                                                                          # WebUIGeneralContext::theUserDismissesAllNotificationsOnTheWebUI()
    Then folder "FOLDER_TO_SHARE" should be marked as locked on the webUI                                                          # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedOnTheWebui()
    And the user dismisses all notifications on the webUI                                                                          # WebUIGeneralContext::theUserDismissesAllNotificationsOnTheWebUI()
    And folder "FOLDER_TO_SHARE" should be marked as locked by user "receiver1" in the locks tab of the details panel on the webUI # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedByUserInLocksTab()
    And folder "FOLDER_TO_SHARE" should be marked as locked by user "receiver2" in the locks tab of the details panel on the webUI # WebUIWebDavLockingContext::theFileShouldBeMarkedAsLockedByUserInLocksTab()
    And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "brand-new-user" by the WebDAV API                         # WebDavLockingContext::numberOfLockShouldBeReported()
    And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "receiver1" by the WebDAV API                              # WebDavLockingContext::numberOfLockShouldBeReported()
    And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "receiver2" by the WebDAV API                              # WebDavLockingContext::numberOfLockShouldBeReported()
SCENARIO RESULT: (fail)

The scenario is trying to unlock the 3rd lock in the list. When that is the lock taken out by brand-new-user then the scenario will pass (the lock can be unlocked). But with PostgreSQL the list can be in a different order. In that case we end up trying to unlock a lock that is not "ours".

It needs some thought about the purpose of the scenario, and how to make it avoid dependency on the display order.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phil-davis
Copy link
Contributor Author

Passing now. See #38081 for a clean run of CI

@phil-davis phil-davis closed this Nov 6, 2020
@phil-davis phil-davis deleted the test-on-postgres-9-4-20201030 branch November 6, 2020 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant