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

[Feat] Support fast fail option for tcl test cases #482

Merged
merged 2 commits into from May 15, 2024

Conversation

arthurkiller
Copy link
Contributor

@arthurkiller arthurkiller commented May 9, 2024

#452 was closed by misoperation, recreate it here

Hi, new here in valkey community.

This PR added a new option for tcl test case which will fail fast once any test cases fail.
This can be useful while running redis CI pipeline, and you want to accelerate the CI pipeline.

Appreciate all the things you guys have done, hope can contribute to this project.

usage for example

./runtest --single unit/type/hash --fast-fail

[ok]: HSET/HLEN - Small hash creation (2 ms)
[ok]: Is the small hash encoded with a listpack? (0 ms)
[ok]: HRANDFIELD - listpack (8 ms)
[ok]: HRANDFIELD - hashtable (7 ms)
Test error (last server port:21113, log:./tests/tmp/server.3935664.1/stdout), test will exit now
[err]: HRANDFIELD with RESP3 in tests/unit/type/hash.tcl
Expected '3' to be equal to '2333' (context: type eval line 8 cmd {assert_equal [llength $res] 2333} proc ::test)
(Fastfail: test will exit now)

Signed-off-by: arthur.lee <arthur-lee@qq.com>
Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.80%. Comparing base (fdd023f) to head (3547f05).
Report is 15 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #482      +/-   ##
============================================
- Coverage     69.81%   69.80%   -0.01%     
============================================
  Files           109      109              
  Lines         61792    61797       +5     
============================================
- Hits          43139    43137       -2     
- Misses        18653    18660       +7     

see 18 files with indirect coverage changes

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

LGTM.

I'm surprised this option didn't already exist.

tests/instances.tcl Outdated Show resolved Hide resolved
@arthurkiller
Copy link
Contributor Author

Update option name

./runtest --single unit/type/hash --fast-fail

[ok]: HSET/HLEN - Small hash creation (2 ms)
[ok]: Is the small hash encoded with a listpack? (0 ms)
[ok]: HRANDFIELD - listpack (8 ms)
[ok]: HRANDFIELD - hashtable (7 ms)
Test error (last server port:21113, log:./tests/tmp/server.3935664.1/stdout), test will exit now
[err]: HRANDFIELD with RESP3 in tests/unit/type/hash.tcl
Expected '3' to be equal to '2333' (context: type eval line 8 cmd {assert_equal [llength $res] 2333} proc ::test)
(Fastfail: test will exit now)

Signed-off-by: arthur.lee <arthur-lee@qq.com>
@madolson madolson merged commit 3de5c71 into valkey-io:unstable May 15, 2024
17 checks passed
hallmason17 pushed a commit to hallmason17/valkey that referenced this pull request May 15, 2024
This PR added a new option for tcl test case which will fail fast once any test cases fail.
This can be useful while running redis CI pipeline, and you want to accelerate the CI pipeline.

usage for example

> ./runtest --single unit/type/hash --fast-fail

---------

Signed-off-by: arthur.lee <arthur-lee@qq.com>
hallmason17 pushed a commit to hallmason17/valkey that referenced this pull request May 18, 2024
This PR added a new option for tcl test case which will fail fast once any test cases fail.
This can be useful while running redis CI pipeline, and you want to accelerate the CI pipeline.

usage for example

> ./runtest --single unit/type/hash --fast-fail

---------

Signed-off-by: arthur.lee <arthur-lee@qq.com>
srgsanky pushed a commit to srgsanky/valkey that referenced this pull request May 19, 2024
This PR added a new option for tcl test case which will fail fast once any test cases fail.
This can be useful while running redis CI pipeline, and you want to accelerate the CI pipeline.

usage for example

> ./runtest --single unit/type/hash --fast-fail

---------

Signed-off-by: arthur.lee <arthur-lee@qq.com>
adetunjii pushed a commit to adetunjii/valkey that referenced this pull request May 22, 2024
This PR added a new option for tcl test case which will fail fast once any test cases fail.
This can be useful while running redis CI pipeline, and you want to accelerate the CI pipeline.

usage for example

> ./runtest --single unit/type/hash --fast-fail

---------

Signed-off-by: arthur.lee <arthur-lee@qq.com>
Signed-off-by: Samuel Adetunji <adetunjithomas1@outlook.com>
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

4 participants