-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
tests(clustering/rpc): add cases for sync.v2.get_delta #14151
base: master
Are you sure you want to change the base?
Conversation
d994317
to
b646fd4
Compare
|
||
-- dp logs | ||
helpers.pwait_until(function() | ||
assert.logfile(name).has.line( |
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.
This kind of assertion already has timeout as the input parameter, so the pwait_until
is not required.
assert.logfile().has.line("\\[file-log\\] failed to open the 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.
Not sure about it, if assertion fails wait_until
may crush, so pwait_until
is a better choice.
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 checked the code in spec/internal/wait.lua, pwait_until is different from wait_until, it can deal with assertion failings.
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.
Maybe I'm not clear enough, assert.logfile().has.line(pattern, boolean, timeout)
, we can pass the timeout into this assertion, so we don't need to warp it with wait_until
or pwait_until
.
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.
Got, let me try it.
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.
It works, but the tests take more time than pwait_until, so my opinion is keeping it.
Summary
KAG-6179
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix #[issue number]