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

Convert e2e_update_node.cpp to e2e test files #1597

Merged
merged 5 commits into from
May 31, 2023

Conversation

rfdavid
Copy link
Collaborator

@rfdavid rfdavid commented May 31, 2023

This PR performs the following:

  • Converts e2e_update_node.cpp into tinysnb/update_node/create.test, tinysnb/update_node/delete.test and tinysnb/update_node/set.test.
  • Adds -DEFINE to create variables
  • Adds ARANGE start end to create lists
    Example:
-DEFINE MY_LIST ARANGE 0 10
# MY_LIST = [0,1,2,3,4,5,6,7,8,9,10]
-STATEMENT MATCH (a:person) WHERE a.ID=0 SET a.Pref ="${MY_LIST}"
...
# Not really a useful example but just to illustrate
-DEFINE R_EXCEPTION "Runtime exception: "
-CASE DivideBy0Error
-QUERY RETURN 1 / 0
---- error
${R_EXCEPTION} Divide by zero.

-CASE ModuloBy0Error
-QUERY RETURN 1 % 0
---- error
${R_EXCEPTION}  Modulo by zero.

* Convert e2e_update_node_test to create.test, delete.test and set.test
* Adds -DEFINE variable anyValue
* Adds -DEFINE ARANGE 0 4 to generate [0,1,2,3,4]
* Deletes e2e_update_node_test
@rfdavid rfdavid requested a review from ray6080 May 31, 2023 01:16
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.01 🎉

Comparison is base (5fc4f24) 91.91% compared to head (6e996b2) 91.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1597      +/-   ##
==========================================
+ Coverage   91.91%   91.92%   +0.01%     
==========================================
  Files         703      703              
  Lines       25544    25545       +1     
==========================================
+ Hits        23479    23483       +4     
+ Misses       2065     2062       -3     

see 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@ray6080 ray6080 left a comment

Choose a reason for hiding this comment

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

  1. Can you add commented tests to the test file (skipped or commented) too? I'm afraid we will forget these tests later when we turn them on.
  2. Let's discuss the DEFINE syntax a bit more, I hope it can be more formally defined and we can extend it later. for example, -DEFINE R_EXCEPTION Runtime exception: is not a clear syntax to me. It should be something along -DEFINE R_EXCEPTION "Runtime exception: ", or -DEFINE R_EXCEPTION STRING("Runtime exception: "), so its data type is clear. I feel like this is important and we should think a bit more on this.


--

-CASE DeleteNodeAfterInsertTest)
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove ")".

@ray6080
Copy link
Contributor

ray6080 commented May 31, 2023

One feedback, though not related to this PR, is that when a test cases contain multiple test units (each identified by a NAME), is there a way that we can print which test unit fails in the log? Currently I believe we only report which test case fails, but it's unclear where the test case breaks.

@rfdavid rfdavid merged commit 8bbec69 into kuzudb:master May 31, 2023
8 checks passed
@rfdavid rfdavid deleted the convert_e2_update_node_test branch May 31, 2023 12:54
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

2 participants