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

Refresh Running Experiment Cache after abort one Experiment #28507

Closed
freddyDOTCMS opened this issue May 9, 2024 · 5 comments
Closed

Refresh Running Experiment Cache after abort one Experiment #28507

freddyDOTCMS opened this issue May 9, 2024 · 5 comments

Comments

@freddyDOTCMS
Copy link
Contributor

Parent Issue

No response

Problem Statement

After abort an Experiment it is keep on the Running Experiment Cache so it means that a User can be still assigned to the Experiment even after it was aborted

Steps to Reproduce

  1. Create a Page
  2. Create a Experiment and Start it
  3. Open a Incognito Window and visit any page on the site, check that you was assigned to the Experiment on the Browser LocalStorage, don't close the Window.
  4. Cancel the Experiment.
  5. Open another tab on the same window from step 3 and visit any page, you should be removed from the Experiment because it is not running anymore.
  6. Open a new incognito Window and Visit any pages, you should not be included on any Experiment

Acceptance Criteria

  1. Not keep included on a Experiment after it was aborted.
  2. Not be assigned to an Experiment after it was aborted

dotCMS Version

latest in master

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@freddyDOTCMS freddyDOTCMS self-assigned this May 13, 2024
github-merge-queue bot pushed a commit that referenced this issue May 15, 2024
#28541)

### Proposed Changes
* Clean the Running Experiment List cache after cancel one Experiment


https://github.com/dotCMS/core/pull/28541/files#diff-5aa71567ff53ee229d25c2386cce3169c657f37a3e04cf27b75b3fd029537a7cR1469

* Refactor assertCachedRunningExperiments test util method

We need compare the size of the list and check if the Cache list is null


https://github.com/dotCMS/core/pull/28541/files#diff-fad94d09d18233a324e27a58867ff9f9967a3106d0cff91d359fb2327967fbecR481-R485

* Update the cancel Experiment test to check that the Running Experiment
List cache is empty after cancel an Experiment


https://github.com/dotCMS/core/pull/28541/files#diff-fad94d09d18233a324e27a58867ff9f9967a3106d0cff91d359fb2327967fbecR4014-R4027


### Checklist
- [x] Tests
@freddyDOTCMS freddyDOTCMS removed their assignment May 15, 2024
@freddyDOTCMS
Copy link
Contributor Author

PR: #28541

@dsilvam
Copy link
Contributor

dsilvam commented May 15, 2024

Passed Internal QA: Running experiments cache properly invalidated upon aborting a running experiment.

@dsilvam dsilvam added QA : Passed Internal LTS : Next Ticket that will be added to LTS labels May 15, 2024
@josemejias11
Copy link

Failed: Tested on trunk_4273db9, Docker, macOS 13.0, FF v124.0.2

I'm not able to see the experiment_data field within the localStorage cache

Screenshot 2024-05-17 at 11 48 29 AM

@freddyDOTCMS
Copy link
Contributor Author

Failed: Tested on trunk_4273db9, Docker, macOS 13.0, FF v124.0.2

I'm not able to see the experiment_data field within the localStorage cache

Screenshot 2024-05-17 at 11 48 29 AM

It is working as excepted

@josemejias11
Copy link

Approved: Tested on trunk_aaa6d05, Docker, macOS 13.0, FF v124.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

4 participants