-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
SQL: fix *SecurityIT tests by covering edge case scenarios when audit file rolls over at midnight #41328
Conversation
but the audit rolling file rolls over. * Use a local boolean variable instead of the static one to account for assertBusy() code block possibly being called multiple times and having different execution paths.
Pinging @elastic/es-search |
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
@@ -188,6 +188,13 @@ public void setInitialAuditLogOffset() { | |||
} catch (IOException e) { | |||
throw new RuntimeException(e); | |||
} | |||
|
|||
// the log file can roll over without being catched by assertLogs() method: in those tests where exceptions are being handled |
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.
catched -> cought
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.
Thanks. caught.
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
… file rolls over at midnight (#41328) * Handle the scenario where assertLogs() is not called from a test method but the audit rolling file rolls over. * Use a local boolean variable instead of the static one to account for assertBusy() code block possibly being called multiple times and having different execution paths. (cherry picked from commit 6f64219)
… file rolls over at midnight (#41328) * Handle the scenario where assertLogs() is not called from a test method but the audit rolling file rolls over. * Use a local boolean variable instead of the static one to account for assertBusy() code block possibly being called multiple times and having different execution paths. (cherry picked from commit 6f64219)
… file rolls over at midnight (#41328) * Handle the scenario where assertLogs() is not called from a test method but the audit rolling file rolls over. * Use a local boolean variable instead of the static one to account for assertBusy() code block possibly being called multiple times and having different execution paths. (cherry picked from commit 6f64219)
… file rolls over at midnight (elastic#41328) * Handle the scenario where assertLogs() is not called from a test method but the audit rolling file rolls over. * Use a local boolean variable instead of the static one to account for assertBusy() code block possibly being called multiple times and having different execution paths.
This PR fixes another edge case scenarios when audit file rolls over at midnight.
Fixes #39348.