Page MenuHomeSoftware Heritage

Allow to use the JAVA_HOME environment for cassandra tests
ClosedPublic

Authored by douardda on Jan 8 2021, 2:10 PM.

Details

Summary

This allows to enforce a specific version of java to be used. For
example, since cassandra seems not to support java 14 yet, this allows
to run tests on bullseye:

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ pytest swh

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D4826 (id=17085)

Could not rebase; Attempt merge onto 2b35198d30...

Updating 2b35198d..fde2589c
Fast-forward
 swh/storage/cassandra/schema.py     | 139 +++++++++++++++++-------------------
 swh/storage/tests/test_cassandra.py |  14 ++--
 2 files changed, 75 insertions(+), 78 deletions(-)
Changes applied before test
commit fde2589cbf3295dd1b41423f65cb07ef269e7964
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 8 10:39:42 2021 +0100

    Allow to use the JAVA_HOME environment for cassandra tests
    
    This allows to enforce a specific version of java to be used. For
    example, since cassandra seems not to support java 14 yet, this allows
    to run tests on bullseye:
    
      JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ pytest swh

commit 44efbe3cae717d2de3acea20fa7111d0314d8835
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 8 10:44:25 2021 +0100

    Make the CREATE_TABLES_QUERIES in cassandra/schema.py an explicit list
    
    prevent being fooled by a missing '\n'.

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1082/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1082/console

Harbormaster returned this revision to the author for changes because remote builds failed.Jan 8 2021, 2:20 PM
Harbormaster failed remote builds in B18225: Diff 17085!

also adapt the tox.ini file

Build is green

Patch application report for D4826 (id=17087)

Could not rebase; Attempt merge onto 2b35198d30...

Updating 2b35198d..b097634f
Fast-forward
 swh/storage/cassandra/schema.py     | 136 +++++++++++++++++-------------------
 swh/storage/tests/test_cassandra.py |  16 +++--
 2 files changed, 73 insertions(+), 79 deletions(-)
Changes applied before test
commit b097634fe1a9b4ec5d6ad180a1b3443488ccded3
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 8 10:39:42 2021 +0100

    Allow to use the JAVA_HOME environment for cassandra tests
    
    This allows to enforce a specific version of java to be used. For
    example, since cassandra seems not to support java 14 yet, this allows
    to run tests on bullseye:
    
      JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ pytest swh

commit 74e6f58e2f9b3e03b911dbe95b1f53f85db8fd42
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 8 10:44:25 2021 +0100

    Make the CREATE_TABLES_QUERIES in cassandra/schema.py an explicit list
    
    prevent being fooled by a missing '\n'.

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

Build is green

Patch application report for D4826 (id=17088)

Could not rebase; Attempt merge onto 2b35198d30...

Updating 2b35198d..d9ddec59
Fast-forward
 swh/storage/cassandra/schema.py     | 136 +++++++++++++++++-------------------
 swh/storage/tests/test_cassandra.py |  16 +++--
 tox.ini                             |   1 +
 3 files changed, 74 insertions(+), 79 deletions(-)
Changes applied before test
commit d9ddec59d5ac5c36a2f32d495ea89046d3db621e
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 8 10:39:42 2021 +0100

    Allow to use the JAVA_HOME environment for cassandra tests
    
    This allows to enforce a specific version of java to be used. For
    example, since cassandra seems not to support java 14 yet, this allows
    to run tests on bullseye:
    
      JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ pytest swh

commit 74e6f58e2f9b3e03b911dbe95b1f53f85db8fd42
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 8 10:44:25 2021 +0100

    Make the CREATE_TABLES_QUERIES in cassandra/schema.py an explicit list
    
    prevent being fooled by a missing '\n'.

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

could you mention it in the README?

This revision is now accepted and ready to land.Jan 8 2021, 2:38 PM

Add a paragraph in the README file

Build has FAILED

Patch application report for D4826 (id=17164)

Rebasing onto 74e6f58e2f...

Current branch diff-target is up to date.
Changes applied before test
commit 3df990dcefa45932f1257a5f31be1d83d26af822
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 8 10:39:42 2021 +0100

    Allow to use the JAVA_HOME environment for cassandra tests
    
    This allows to enforce a specific version of java to be used. For
    example, since cassandra seems not to support java 14 yet, this allows
    to run tests on bullseye:
    
      JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ pytest swh

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1093/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1093/console

Build is green

Patch application report for D4826 (id=17168)

Rebasing onto 30945a5890...

Current branch diff-target is up to date.
Changes applied before test
commit 728c3eeaae84a7e249a712a5545cc9ba682403c3
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Jan 8 10:39:42 2021 +0100

    Allow to use the JAVA_HOME environment for cassandra tests
    
    This allows to enforce a specific version of java to be used. For
    example, since cassandra seems not to support java 14 yet, this allows
    to run tests on bullseye:
    
      JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ pytest swh

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