-
Notifications
You must be signed in to change notification settings - Fork 333
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: more sleep when flow insert makes it serial #4373
Conversation
WalkthroughThe modifications across the SQL files primarily adjust the sleep durations in various SQL operations, reducing them from 3 seconds to 2 seconds, and introduce additional 500 milliseconds sleep commands. These changes are aimed at optimizing the timing and execution flow of the SQL scripts. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- tests/cases/standalone/common/flow/basic.result (2 hunks)
- tests/cases/standalone/common/flow/basic.sql (1 hunks)
- tests/cases/standalone/common/flow/df_func.result (10 hunks)
- tests/cases/standalone/common/flow/df_func.sql (4 hunks)
Files skipped from review due to trivial changes (1)
- tests/cases/standalone/common/flow/df_func.result
Additional comments not posted (8)
tests/cases/standalone/common/flow/basic.sql (2)
13-13
: Addition of a new sleep command to ensure serialization.The addition of a
-- SQLNESS SLEEP 500ms
command before theINSERT
operation is intended to control the timing of data insertion relative to the flow operation, aligning with the PR's objective to make the tests more serial.
22-22
: Introduction of additional sleep command for better control over data insertion timing.Adding another
-- SQLNESS SLEEP 500ms
command before the subsequentINSERT
operation helps in managing the sequence of operations, crucial for achieving the desired test serialization.tests/cases/standalone/common/flow/basic.result (3)
17-17
: Addition of a new sleep command reflected in the results file.The inclusion of
-- SQLNESS SLEEP 500ms
in the results file is consistent with the changes made in the.sql
file, ensuring that the test expectations align with the actual test setup.
25-25
: Updated sleep duration in the results file.The adjustment of sleep duration from 3 seconds to 2 seconds in the results file matches the change in the
.sql
file. This consistency is crucial for accurate test validation.
34-34
: Consistency in additional sleep command across SQL and result files.The additional
-- SQLNESS SLEEP 500ms
command in the results file mirrors the corresponding change in the.sql
file, ensuring that the test setup and expectations are synchronized.tests/cases/standalone/common/flow/df_func.sql (3)
14-14
: Introduction of a new sleep command for better serialization control.The new
-- SQLNESS SLEEP 500ms
command before data insertion helps manage the timing of operations, aligning with the PR's objective to prevent out-of-order queries.
21-21
: Optimization of sleep duration for better test performance.Reducing the sleep duration to 2 seconds before the
SELECT
operation is consistent with the changes in other files and helps optimize the test flow without compromising the serialization requirement.
24-24
: Additional sleep command to ensure proper data insertion timing.Adding another
-- SQLNESS SLEEP 500ms
command before subsequent data insertion is crucial for maintaining the sequence of operations, especially in a testing environment where timing is critical.
@discord9 I have updated the title to fix the semantic check. https://github.com/GreptimeTeam/greptimedb/actions/runs/9949757194/job/27486637312?pr=4373 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4373 +/- ##
==========================================
- Coverage 85.14% 84.87% -0.27%
==========================================
Files 1068 1074 +6
Lines 191512 191831 +319
==========================================
- Hits 163055 162822 -233
- Misses 28457 29009 +552 |
There is also another issue related to flow sqlness test. |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- tests/cases/standalone/common/flow/basic.sql (2 hunks)
- tests/cases/standalone/common/flow/df_func.sql (8 hunks)
Files skipped from review due to trivial changes (1)
- tests/cases/standalone/common/flow/basic.sql
Files skipped from review as they are similar to previous changes (1)
- tests/cases/standalone/common/flow/df_func.sql
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- tests/cases/standalone/common/flow/basic.result (2 hunks)
- tests/cases/standalone/common/flow/df_func.result (8 hunks)
Additional comments not posted (6)
tests/cases/standalone/common/flow/basic.result (3)
17-17
: Introduced sleep command before data insertion.This change is consistent with the PR's objective to ensure more controlled timing of SQL operations.
34-34
: Introduced additional sleep command before data insertion.This addition helps in managing the sequence of operations, aligning with the aim to make the test more serial.
42-42
: Retention of existing sleep command.Maintaining this delay is crucial for the serial execution of the test, ensuring that operations do not overlap or execute out of order.
tests/cases/standalone/common/flow/df_func.result (3)
18-18
: Introduced sleep command before data insertion.This change helps ensure that data is inserted at a controlled time, aligning with the PR's objective to serialize the test operations.
36-36
: Introduced additional sleep command before data insertion.This addition helps in managing the sequence of operations, aligning with the aim to make the test more serial.
44-44
: Retention of existing sleep command.Maintaining this delay is crucial for the serial execution of the test, ensuring that operations do not overlap or execute out of order.
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.
LGTM
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
add more sleep intrinsic in flow's sqlness test, so to make it more serial and prevent getting wrong result by preventing query to happen out of order
Checklist
Summary by CodeRabbit