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

chore: Improve the test coverage of datastore #1203

Merged
merged 5 commits into from
Mar 27, 2023

Conversation

fredcarle
Copy link
Collaborator

Relevant issue(s)

Resolves #1124

Description

This PR improves the test coverage of the datastore package. It is not 100% yet but it might be enough for now.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

unit test

Specify the platform(s) on which this was tested:

  • MacOS

@fredcarle fredcarle added area/datastore Related to the datastore / storage engine system code quality Related to improving code quality action/no-benchmark Skips the action that runs the benchmark. labels Mar 20, 2023
@fredcarle fredcarle added this to the DefraDB v0.5 milestone Mar 20, 2023
@fredcarle fredcarle requested a review from a team March 20, 2023 19:54
@fredcarle fredcarle self-assigned this Mar 20, 2023
@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Merging #1203 (42aceb3) into develop (55f4e05) will increase coverage by 1.97%.
The diff coverage is 97.16%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1203      +/-   ##
===========================================
+ Coverage    68.61%   70.59%   +1.97%     
===========================================
  Files          181      182       +1     
  Lines        17144    17133      -11     
===========================================
+ Hits         11764    12095     +331     
+ Misses        4422     4109     -313     
+ Partials       958      929      -29     
Impacted Files Coverage Δ
datastore/badger/v3/compat_logger.go 0.00% <ø> (ø)
datastore/badger/v3/datastore.go 77.29% <62.50%> (+37.67%) ⬆️
datastore/badger/v3/errors.go 100.00% <100.00%> (ø)
datastore/badger/v3/iterator.go 57.05% <100.00%> (+1.49%) ⬆️
datastore/memory/memory.go 95.73% <100.00%> (+7.00%) ⬆️
datastore/memory/txn.go 100.00% <100.00%> (+11.11%) ⬆️

... and 11 files with indirect coverage changes

Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

Thanks for this Fred - looks good. I have some concerns RE the code removed here though, as it is removing features from our users and we should discuss that.

datastore/badger/v3/datastore.go Outdated Show resolved Hide resolved
datastore/badger/v3/datastore.go Show resolved Hide resolved
datastore/badger/v3/datastore.go Show resolved Hide resolved
datastore/badger/v3/iterator.go Outdated Show resolved Hide resolved
@fredcarle fredcarle force-pushed the fredcarle/chore/I1124-datastore-code-coverage branch 2 times, most recently from 980877b to ee9d080 Compare March 22, 2023 19:10
Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

LGTM - thanks Fred :)

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

LGTM, pointed to some minor typos

datastore/memory/memory.go Outdated Show resolved Hide resolved
datastore/memory/memory.go Outdated Show resolved Hide resolved
@fredcarle fredcarle force-pushed the fredcarle/chore/I1124-datastore-code-coverage branch from a0c9ad9 to 63f08ca Compare March 24, 2023 22:18
@fredcarle fredcarle merged commit 977ffcc into develop Mar 27, 2023
@fredcarle fredcarle deleted the fredcarle/chore/I1124-datastore-code-coverage branch March 27, 2023 16:39
shahzadlone pushed a commit that referenced this pull request Apr 13, 2023
Relevant issue(s)
Resolves #1124

Description
This PR improves the test coverage of the datastore package. It is not 100% yet but it might be enough for now.
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
Relevant issue(s)
Resolves sourcenetwork#1124

Description
This PR improves the test coverage of the datastore package. It is not 100% yet but it might be enough for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/datastore Related to the datastore / storage engine system code quality Related to improving code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve datastore code coverage
4 participants