Skip to content

Conversation

@albertzaharovits
Copy link
Contributor

@albertzaharovits albertzaharovits commented Feb 15, 2021

LdapSessionFactoryTests#testSslTrustIsReloaded relies on the resource watcher to detect the cert file overwriting.
Resource watcher detects changes by only inspecting the file size on disk and the last access timestamp.
For the last access timestamp, the resolution can be as low as one second depending on the JDK and the FS type.
It is thus preferable to rely on file size differences in tests.

Closes #68995

@albertzaharovits albertzaharovits self-assigned this Feb 15, 2021
@albertzaharovits albertzaharovits changed the title Test unmute Fix test LdapSessionFactoryTests testSslTrustIsReloaded Feb 15, 2021
@albertzaharovits albertzaharovits added :Security/TLS SSL/TLS, Certificates >test Issues or PRs that are addressing/adding tests v6.8.15 v7.11.2 v7.12.0 labels Feb 15, 2021
@albertzaharovits albertzaharovits marked this pull request as ready for review February 15, 2021 21:52
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Feb 15, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

Copy link
Contributor

@jkakavas jkakavas left a comment

Choose a reason for hiding this comment

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

Thanks Albert, LGTM!

@albertzaharovits albertzaharovits merged commit 42b8259 into elastic:7.x Feb 16, 2021
@albertzaharovits albertzaharovits deleted the fix-cert-update-fallout branch February 16, 2021 08:36
albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Feb 16, 2021
LdapSessionFactoryTests#testSslTrustIsReloaded relies on the resource watcher
to detect the cert file overwriting. Resource watcher detects changes by only
inspecting the file size on disk and the last access timestamp.
For the last access timestamp, the resolution can be as low as one second depending
on the JDK and the FS type. It is thus preferable to rely on file size differences in tests.

Closes elastic#68995
albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Feb 16, 2021
LdapSessionFactoryTests#testSslTrustIsReloaded relies on the resource watcher
to detect the cert file overwriting. Resource watcher detects changes by only
inspecting the file size on disk and the last access timestamp.
For the last access timestamp, the resolution can be as low as one second depending
on the JDK and the FS type. It is thus preferable to rely on file size differences in tests.

Closes elastic#68995
albertzaharovits added a commit that referenced this pull request Feb 16, 2021
LdapSessionFactoryTests#testSslTrustIsReloaded relies on the resource watcher
to detect the cert file overwriting. Resource watcher detects changes by only
inspecting the file size on disk and the last access timestamp.
For the last access timestamp, the resolution can be as low as one second depending
on the JDK and the FS type. It is thus preferable to rely on file size differences in tests.

Closes #68995
albertzaharovits added a commit that referenced this pull request Feb 16, 2021
LdapSessionFactoryTests#testSslTrustIsReloaded relies on the resource watcher
to detect the cert file overwriting. Resource watcher detects changes by only
inspecting the file size on disk and the last access timestamp.
For the last access timestamp, the resolution can be as low as one second depending
on the JDK and the FS type. It is thus preferable to rely on file size differences in tests.

Closes #68995
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Security/TLS SSL/TLS, Certificates Team:Security Meta label for security team >test Issues or PRs that are addressing/adding tests v6.8.15 v7.11.2 v7.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants