Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

CORTX-33672: added unit test cases for lock and unlock interface #871

Merged
merged 2 commits into from
Aug 16, 2022

Conversation

lakshita-jain
Copy link
Contributor

@lakshita-jain lakshita-jain commented Aug 16, 2022

Signed-off-by: Lakshita Jain lakshita.jain@seagate.com

Problem Statement

  • Unit test cases for lock and unlock interface

Design

This PR covers following test cases for lock and unlock suggested by Ujjwal:

  1. test “test_lock” interface
  2. test “lock” interface
  3. test “lock” repeat
  4. lock at one thread and test “lock” from a different thread
  5. lock at one thread and test “unlock” from a different thread
  6. test “unlock” interface
  7. test “unlock” repeat
  8. unlock from one thread and test “lock” from another
  9. lock from one thread and test “unlock with force=true” from another thread
  10. force unlock from one thread and test repeat “unlock” from another thread after
  11. test “lock” interface with duration n seconds

test case results:
`[root@ssc-vm-g4-rhev4-2113 conf_store]# python3 ./test_conf_store_lock_unlock.py
........

Ran 8 tests in 0.218s

OK
`

Coding

  • Coding conventions are followed and code is consistent [Y/N]:
  • Confirm All CODACY errors are resolved [Y/N]:

Testing

  • Are test cases updated along with code changes due to Enhancements/Bugs [Y/N]:
  • Confirm that new test cases are added to regression and sanity plan files and relevant feature plan files [Y/N]:
  • Confirm that Test Cases are added for new features added [Y/N]:
  • Confirm Test Cases cover Happy Path, Non-Happy Path and Scalability [Y/N]:
  • Confirm Testing was performed with installed RPM/K8s deployment [Y/N]:

Review Checklist

Before posting the PR please ensure:

  • PR is self reviewed
  • Is there a change in filename/package/module or signature [Y/N]:
  • If yes for above point, Is a notification sent to all other cortx components [Y/N]
  • New package/s added to setup.py?
  • Jira is updated
  • Check if the description is clear and explained.
  • Check Acceptance Criterion is defined.
  • All the tests performed should be mentioned before Resolving a JIRA.
  • Verification needs to be done before marked as Closed/Verified.

KVstore/Confstore feature (changes/fixes) checklist

Confirm changes are made for:

  • ConfStore
  • KVStore
  • ConfCli
  • Test cases added for all above 3
  • changes done in all the KVpayloads (ConsulKvPayload, IniKvPayload, KvPayload)

Documentation

  • Changes done to WIKI / Confluence page

Signed-off-by: Lakshita Jain <lakshita.jain@seagate.com>
Copy link
Contributor

@tanujashinde0405 tanujashinde0405 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Lakshita Jain <lakshita.jain@seagate.com>
Copy link

@nitin-seagate nitin-seagate left a comment

Choose a reason for hiding this comment

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

LGTM

@tanujashinde0405 tanujashinde0405 merged commit 772d732 into main Aug 16, 2022
@tanujashinde0405 tanujashinde0405 deleted the CORTX-33762-1 branch August 16, 2022 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants