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] [full-ci]Add tests for project drive resource share expiry notification #10986

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amrita-shrestha
Copy link
Contributor

@amrita-shrestha amrita-shrestha commented Feb 11, 2025

Description

This PR adds tests related to the share expiry notification of resource inside project drive.
It seems like there is a bug which make this scenario flaky. Sometime we get single notification, sometime we get 2 notification for share expiry.

Below you can see mail we get when test is flaky

    And user "Brian" should have "2" emails                                                                         # NotificationContext::userShouldHaveEmail()
      │ array(3) {
      │   [0]=>
      │   object(stdClass)#3127 (9) {
      │     ["mailbox"]=>
      │     string(5) "brian"
      │     ["id"]=>
      │     string(20) "20250211T050947-0027"
      │     ["from"]=>
      │     string(47) "Alice Hansen via owncloud <[email protected]>"
      │     ["to"]=>
      │     array(1) {
      │       [0]=>
      │       string(19) "<[email protected]>"
      │     }
      │     ["subject"]=>
      │     string(43) "Alice Hansen shared 'testfile.txt' with you"
      │     ["date"]=>
      │     string(30) "2025-02-11T05:09:47.884899228Z"
      │     ["posix-millis"]=>
      │     int(1739250587884)
      │     ["size"]=>
      │     int(2591)
      │     ["seen"]=>
      │     bool(false)
      │   }
      │   [1]=>
      │   object(stdClass)#3130 (9) {
      │     ["mailbox"]=>
      │     string(5) "brian"
      │     ["id"]=>
      │     string(20) "20250211T050948-0028"
      │     ["from"]=>
      │     string(47) "Alice Hansen via owncloud <[email protected]>"
      │     ["to"]=>
      │     array(1) {
      │       [0]=>
      │       string(19) "<[email protected]>"
      │     }
      │     ["subject"]=>
      │     string(55) "Membership of 'NewSpace' expired at 2025-02-11 10:49:47"
      │     ["date"]=>
      │     string(30) "2025-02-11T05:09:48.068341429Z"
      │     ["posix-millis"]=>
      │     int(1739250588068)
      │     ["size"]=>
      │     int(2633)
      │     ["seen"]=>
      │     bool(false)
      │   }
      │   [2]=>
      │   object(stdClass)#3131 (9) {
      │     ["mailbox"]=>
      │     string(5) "brian"
      │     ["id"]=>
      │     string(20) "20250211T050948-0029"
      │     ["from"]=>
      │     string(47) "Alice Hansen via owncloud <[email protected]>"
      │     ["to"]=>
      │     array(1) {
      │       [0]=>
      │       string(19) "<[email protected]>"
      │     }
      │     ["subject"]=>
      │     string(55) "Membership of 'NewSpace' expired at 2025-02-11 10:49:47"
      │     ["date"]=>
      │     string(30) "2025-02-11T05:09:48.069781255Z"
      │     ["posix-millis"]=>
      │     int(1739250588069)
      │     ["size"]=>
      │     int(2633)
      │     ["seen"]=>
      │     bool(false)
      │   }
      │ }
      │ 
      Failed asserting that actual size 3 matches expected size 2.

Related Issue

Motivation and Context

How Has This Been Tested?

  • locally

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@amrita-shrestha amrita-shrestha self-assigned this Feb 11, 2025
@amrita-shrestha amrita-shrestha force-pushed the share-expiry-notification-tests-of-project-resource branch from 8106fe0 to 65608d0 Compare February 11, 2025 06:18
@amrita-shrestha amrita-shrestha force-pushed the share-expiry-notification-tests-of-project-resource branch from 65608d0 to 3411b67 Compare February 11, 2025 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant