-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix sporadic error in view log REST integration test #24360
Conversation
Signed-off-by: Alexander Pinčuk <alexander.v.pinchuk@gmail.com>
Nope, this is not how we should resolve it. Finally we would not test anything. Except - there can be some log going through buffers while we do the first call. We receive the response, then the record can be processed, then in the second call we can receive it. Probably what this test should do is:
|
Also - if the test fails, it should print why. Now it would compare numbers, it would not tell anything useful. |
Because query param of request formally is an offset from the beggining of the log file, we have two cases:
Maybe try to use this conditions? |
Also, when second response is empty then url's are equals. And non-equals in opposite case |
I'll reopen the PR. Which option is preferred - parse offsets or just compare url's? |
Here I would check that the API works and accept what is correct result. So there are two possibilities - as you wrote:
These two situation I would both accept as correct. Do you agree? |
Signed-off-by: Alexander Pinčuk <alexander.v.pinchuk@gmail.com>
This is a bug fix.
Under some circumstances the test may sporadically fails. This occurs when we expect an empty log, but it actually may contains several log records. I'm assuming this is due to the deferred write.