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

Feature/TR-5854/Detect delivery concurrency #522

Merged
merged 6 commits into from
Dec 1, 2023

Conversation

jsconan
Copy link
Contributor

@jsconan jsconan commented Nov 24, 2023

Related to: https://oat-sa.atlassian.net/browse/TR-5854

RFE: https://oat-sa.atlassian.net/browse/RFE-748

Summary

Add a mechanism for detecting concurrent delivery sessions.

Details

When the test runner initializes, a sequence number is stored in the browser's storage. Each time the duration is updated, the sequence number is read from the storage and compared with the value created at the beginning. If a discrepancy is discovered this means another test runner started meanwhile and updated the storage. A dialog message is presented to the user and the test runner is stopped.

How to test

  • install: npm ci
  • run the tests: npm test

For checking the feature, please refer to the companion PR: oat-sa/extension-tao-testqti#2420

Copy link

github-actions bot commented Nov 24, 2023

Coverage Report

Totals Coverage
Statements: 75.79% ( 8034 / 10601 )
Methods: 77.59% ( 1326 / 1709 )
Lines: 79.29% ( 4603 / 5805 )
Branches: 68.19% ( 2105 / 3087 )

StandWithUkraine

@jsconan jsconan changed the title Feature/TR-5858/Detect delivery concurrency Feature/TR-5854/Detect delivery concurrency Nov 27, 2023
Copy link

Version

Target Version 4.1.0
Last version 4.0.0

There are 0 BREAKING CHANGE, 4 features, 0 fix

Copy link
Contributor

@shaveko shaveko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks nice

Thanks for the demo

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code is respecting code style rules
  • New code is respecting best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful

Copy link

@erkobridee erkobridee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good 👍

Review Checklist

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code respects code style rules
  • New code respects best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful
  • Pull request's target is not master
  • Commits are following conventional commits
  • Commits messages are meaningful
  • Commits are atomic

);
testRunner.trigger('leave', {
code: states.testSession.suspended,
message: __(
Copy link

@gabrielfs7 gabrielfs7 Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • @jsconan Can you confirm how this string will be linked to PO files? I think Infosign will that there. Thanks! :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabrielfs7 the translation scanner will take care of it, from the consumer extension, as usual (say taoQtiTest)

@jsconan jsconan merged commit 95d3b77 into develop Dec 1, 2023
3 checks passed
@jsconan jsconan deleted the feature/TR-5858/detect-delivery-concurrency branch December 1, 2023 14:29
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.

None yet

4 participants