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

chore(tests): refactor and enhance test cases to prevent flaky test failure #2544

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

git-hulk
Copy link
Member

This may fix flaky tests:

--- FAIL: TestLogClean (4.08s)
    logclean_test.go:63: 
        	Error Trace:	/home/runner/work/kvrocks/kvrocks/tests/gocase/unit/log/logclean_test.go:63
        	Error:      	Not equal: 
        	            	expected: true
        	            	actual  : false
        	Test:       	TestLogClean
FAIL
exit status 1

and

Traceback (most recent call last):
  File "/home/runner/work/kvrocks/kvrocks/utils/kvrocks2redis/tests/check_consistency.py", line 132, in <module>
    redis_comparator.compare_redis_data(args.key_file)
  File "/home/runner/work/kvrocks/kvrocks/utils/kvrocks2redis/tests/check_consistency.py", line 91, in compare_redis_data
    self._import_and_compare(100)
  File "/home/runner/work/kvrocks/kvrocks/utils/kvrocks2redis/tests/check_consistency.py", line 116, in _import_and_compare
    raise AssertionError(f"Data mismatch for key '{key}': source data: '{src_data}' destination data: '{dst_data}'")
AssertionError: Data mismatch for key 'key_[36](https://github.com/apache/kvrocks/actions/runs/10895781702/job/30235147974#step:18:37)': source data: 'value_36' destination data: 'None'

@git-hulk git-hulk changed the title Refactor and enhance test cases to prevent flaky test failure chore(tests): refactor and enhance test cases to prevent flaky test failure Sep 18, 2024
@git-hulk git-hulk force-pushed the improve/test-cases branch 2 times, most recently from 33b3fad to 61575bc Compare September 18, 2024 13:33
Copy link

sonarcloud bot commented Sep 18, 2024

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.

1 participant