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

SQL: fix *SecurityIT tests by covering edge case scenarios when audit file rolls over at midnight #41328

Merged
merged 4 commits into from
Apr 18, 2019

Conversation

astefan
Copy link
Contributor

@astefan astefan commented Apr 18, 2019

This PR fixes another edge case scenarios when audit file rolls over at midnight.

Fixes #39348.

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.
@astefan astefan added >test Issues or PRs that are addressing/adding tests >test-failure Triaged test failures from CI :Analytics/SQL SQL querying v8.0.0 v7.2.0 v7.0.1 v6.7.3 labels Apr 18, 2019
@astefan astefan requested review from costin and matriv April 18, 2019 07:30
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

Copy link
Contributor

@matriv matriv left a 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
Copy link
Contributor

Choose a reason for hiding this comment

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

catched -> cought

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. caught.

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

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

LGTM

@astefan astefan merged commit 6f64219 into elastic:master Apr 18, 2019
astefan added a commit that referenced this pull request Apr 18, 2019
… 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)
astefan added a commit that referenced this pull request Apr 18, 2019
… 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)
astefan added a commit that referenced this pull request Apr 18, 2019
… 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)
@colings86 colings86 added v6.7.2 and removed v6.7.3 labels Apr 24, 2019
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/SQL SQL querying >test Issues or PRs that are addressing/adding tests >test-failure Triaged test failures from CI v6.7.2 v7.0.1 v7.2.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL: JdbcSecurityIT fail when reading audit logging files at rollover time
6 participants