Page MenuHomeSoftware Heritage

conftest: Fix tests hang with elasticsearch 7.17.3
ClosedPublic

Authored by anlambert on Apr 25 2022, 12:19 PM.

Details

Summary

elasticsearch 7.17.3 uses JDK >= 18 which changed the value of
"java.security.manager" property to "disallow".

As a consequence a "java.lang.UnsupportedOperationException" is
now raised when bootstrapping elasticsearch server used in tests.

So explicitely set the "java.security.manager" property to "allow"
to avoid that exception raising when elasticsearch setups its custom
security manager.

See SecuritManager documentation.

Diff Detail

Repository
rDSEA Archive search
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7640 (id=27656)

Rebasing onto 418a660b8a...

Current branch diff-target is up to date.
Changes applied before test
commit aabe4bf669fb6252078f0ca6a5b9d4c8fb96f5c1
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Apr 25 12:13:42 2022 +0200

    conftest: Fix tests hang with elasticsearch 7.17.3
    
    elasticsearch 7.17.3 uses JDK >= 18 which changed the value of
    "java.security.manager" property to "disallow".
    
    As a consequence a "java.lang.UnsupportedOperationException" is
    now raised when bootstrapping elasticsearch server used in tests.
    
    So explicitely set the "java.security.manager" property to "allow"
    to avoid that exception raising when elasticsearch setups its custom
    security manager.

See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/328/ for more details.

This revision is now accepted and ready to land.Apr 25 2022, 1:31 PM

Reference task in commit message

Build is green

Patch application report for D7640 (id=27658)

Rebasing onto 418a660b8a...

Current branch diff-target is up to date.
Changes applied before test
commit 377ba2c8c194c606e6ba94844427cf5b7db446ed
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Apr 25 12:13:42 2022 +0200

    conftest: Fix tests hang with elasticsearch 7.17.3
    
    elasticsearch 7.17.3 uses JDK >= 18 which changed the value of
    "java.security.manager" property to "disallow".
    
    As a consequence a "java.lang.UnsupportedOperationException" is
    now raised when bootstrapping elasticsearch server used in tests.
    
    So explicitely set the "java.security.manager" property to "allow"
    to avoid that exception raising when elasticsearch setups its custom
    security manager.
    
    Closes T4192

See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/329/ for more details.