-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix nested nodes in commits #385
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0060e08
Add section on running specific tests to README
cap10morgan 12b59bc
Fix nested node commits
cap10morgan 92f843d
Retry a test assertion w/ a race condition
cap10morgan 40010d4
Remove obsolete ref flake creation
cap10morgan 1dffc97
infer integer values to $xsd:long to prevent overflow
cap10morgan 0f50e36
Fix a docstring typo
cap10morgan fa1d4ba
Delete unused f.d.q.json-ld.response/iri-only-ref fn
cap10morgan e48a2a6
Improve arg name & docstring of retry-promise-wrapped
cap10morgan 3f72c78
De-parallelize retracts & asserts b/c passing a volatile
cap10morgan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,45 +49,45 @@ | |
[alice-sid 200 1001 0 -1 true nil] | ||
[alice-sid 1002 "Alice" 1 -1 true nil] | ||
[alice-sid 1003 "[email protected]" 1 -1 true nil] | ||
[alice-sid 1004 50 7 -1 true nil] | ||
[alice-sid 1005 9 7 -1 true nil] | ||
[alice-sid 1005 42 7 -1 true nil] | ||
[alice-sid 1005 76 7 -1 true nil]] | ||
[alice-sid 1004 50 8 -1 true nil] | ||
[alice-sid 1005 9 8 -1 true nil] | ||
[alice-sid 1005 42 8 -1 true nil] | ||
[alice-sid 1005 76 8 -1 true nil]] | ||
(->> @(fluree/slice db :spot [alice-sid]) | ||
(mapv flake/Flake->parts))) | ||
"Slice should return a vector of flakes for only Alice"))) | ||
|
||
(testing "Slice for subject + predicate" | ||
(let [alice-sid @(fluree/internal-id db :ex/alice) | ||
favNums-pid @(fluree/internal-id db :ex/favNums)] | ||
(is (= [[alice-sid favNums-pid 9 7 -1 true nil] | ||
[alice-sid favNums-pid 42 7 -1 true nil] | ||
[alice-sid favNums-pid 76 7 -1 true nil]] | ||
(is (= [[alice-sid favNums-pid 9 8 -1 true nil] | ||
[alice-sid favNums-pid 42 8 -1 true nil] | ||
[alice-sid favNums-pid 76 8 -1 true nil]] | ||
(->> @(fluree/slice db :spot [alice-sid favNums-pid]) | ||
(mapv flake/Flake->parts))) | ||
"Slice should only return Alice's favNums (multi-cardinality)"))) | ||
|
||
(testing "Slice for subject + predicate + value" | ||
(let [alice-sid @(fluree/internal-id db :ex/alice) | ||
favNums-pid @(fluree/internal-id db :ex/favNums)] | ||
(is (= [[alice-sid favNums-pid 42 7 -1 true nil]] | ||
(is (= [[alice-sid favNums-pid 42 8 -1 true nil]] | ||
(->> @(fluree/slice db :spot [alice-sid favNums-pid 42]) | ||
(mapv flake/Flake->parts))) | ||
"Slice should only return the specified favNum value"))) | ||
|
||
(testing "Slice for subject + predicate + value + datatype" | ||
(let [alice-sid @(fluree/internal-id db :ex/alice) | ||
favNums-pid @(fluree/internal-id db :ex/favNums)] | ||
(is (= [[alice-sid favNums-pid 42 7 -1 true nil]] | ||
(->> @(fluree/slice db :spot [alice-sid favNums-pid [42 7]]) | ||
(is (= [[alice-sid favNums-pid 42 8 -1 true nil]] | ||
(->> @(fluree/slice db :spot [alice-sid favNums-pid [42 8]]) | ||
(mapv flake/Flake->parts))) | ||
"Slice should only return the specified favNum value with matching datatype"))) | ||
|
||
(testing "Slice for subject + predicate + value + mismatch datatype" | ||
(let [alice-sid @(fluree/internal-id db :ex/alice) | ||
favNums-pid @(fluree/internal-id db :ex/favNums)] | ||
(is (= [] | ||
(->> @(fluree/slice db :spot [alice-sid favNums-pid [42 8]]) | ||
(->> @(fluree/slice db :spot [alice-sid favNums-pid [42 7]]) | ||
(mapv flake/Flake->parts))) | ||
"We specify a different datatype for the value, nothing should be returned"))) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know the
<?
for retracts looked misplaced as it was, but it was intentional.Its purpose was to run the fairly costly
assert-flakes
andretract-flakes
in parallel on different threads, as opposed to serially.This change makes it run serially.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the original parallelization change here 3 weeks ago (in 64a7fd7) but recently noticed that it may not be safe b/c it's being passed a volatile map that is also being passed to assert-flakes.
So I reverted it back to the way it was before 64a7fd7.