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

test: Add P2P tests for relational docs #1042

Merged
merged 6 commits into from
Jan 19, 2023

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #1027

Description

Adds P2P tests for relational docs. Only a couple of useful tests actually came to mind for now, but it seems likely that they will be expanded upon in the future (particularly when introducing Lens) - the changes to the framework permitting that should make that a little easier.

No prod bugs found, although it is possible that TestP2POneToManyPeerWithCreateUpdateLinkingSyncedDocToUnsyncedDoc is only passing due to the probable-oddness documented by TestMutationCreateOneToOneNoChild.

@AndrewSisley AndrewSisley added area/testing Related to any test or testing suite area/p2p Related to the p2p networking system action/no-benchmark Skips the action that runs the benchmark. labels Jan 19, 2023
@AndrewSisley AndrewSisley added this to the DefraDB v0.5 milestone Jan 19, 2023
@AndrewSisley AndrewSisley requested a review from a team January 19, 2023 19:58
@AndrewSisley AndrewSisley self-assigned this Jan 19, 2023
@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Merging #1042 (234742c) into develop (019df39) will decrease coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1042      +/-   ##
===========================================
- Coverage    58.02%   57.95%   -0.08%     
===========================================
  Files          174      174              
  Lines        19563    19563              
===========================================
- Hits         11352    11337      -15     
- Misses        7215     7227      +12     
- Partials       996      999       +3     
Impacted Files Coverage Δ
net/client.go 78.04% <0.00%> (-7.32%) ⬇️
net/peer.go 48.32% <0.00%> (-2.16%) ⬇️
net/pb/net.pb.go 15.66% <0.00%> (-0.17%) ⬇️

@AndrewSisley AndrewSisley force-pushed the sisley/test/I1027-test-p2p-relational branch from 80fe49c to 234742c Compare January 19, 2023 20:03
No tests have changed in this commit, they have just moved and the collection index added to the relevant test case properties.
Updates for 'Creates' documents were incorrectly waited for,  resulting in false negative test results.
Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

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

LGTM.

@AndrewSisley AndrewSisley merged commit ad4878e into develop Jan 19, 2023
@AndrewSisley AndrewSisley deleted the sisley/test/I1027-test-p2p-relational branch January 19, 2023 20:51
shahzadlone pushed a commit that referenced this pull request Apr 13, 2023
* Remove unused property

* Allow wait group to complete on timeout

* Move existing tests to simple dir

* Pass schema in as param

No tests have changed in this commit, they have just moved and the collection index added to the relevant test case properties.

* Correctly calculate expected waits for peers

Updates for 'Creates' documents were incorrectly waited for,  resulting in false negative test results.

* Add one to many p2p tests
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
* Remove unused property

* Allow wait group to complete on timeout

* Move existing tests to simple dir

* Pass schema in as param

No tests have changed in this commit, they have just moved and the collection index added to the relevant test case properties.

* Correctly calculate expected waits for peers

Updates for 'Creates' documents were incorrectly waited for,  resulting in false negative test results.

* Add one to many p2p tests
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/p2p Related to the p2p networking system area/testing Related to any test or testing suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

P2P integration tests do not cover relational objects
2 participants