Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7985

Unit tests do not respect tests.jvmargs

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 6.15.2.1, EJBCA 7.1.0
    • Component/s: None
    • Labels:

      Description

      The tests.jvmargs option can be used to specify JVM options for JUnit processes, for example to limit memory usage. For example:

      ant test:runone -Dtest.runone=PublisherTest -Dtests.jvmargs="-Xmx1m -XX:OnOutOfMemoryError='kill -9 %p'"

      This property is only respected in modules/systemtests and modules/ejbca-webtests, so it is not applied for the other modules (which contain the unit tests)

      This causes out-of-memory problems on Jenkins from time to time, in the unit test jobs.

      To verify that it works:
      Set it to a very low value, like
      -Dtests.jvmargs="-Xmx1m -XX:OnOutOfMemoryError='kill -9 %p'"
      If the option is working, there should be an out-of-memory error.
      This should be tested with one test in each module (or with test:runsa, which runs all tests)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ulf_undmark Ulf Undmark
                Reporter:
                samuel Samuel Lidén Borell
                Verified by:
                Samuel Lidén Borell
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 6 hours Original Estimate - 6 hours
                  6h
                  Remaining:
                  Time Spent - 5 hours, 44 minutes Remaining Estimate - 25 minutes
                  25m
                  Logged:
                  Time Spent - 5 hours, 44 minutes Remaining Estimate - 25 minutes
                  5h 44m