Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25507

Enhance CoreFeature with ability to globally enable a specific WorkManager implementation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 9.10
    • Fix Version/s: 10.3
    • Component/s: Core, Events / Works
    • Release Notes Description:
      Hide

      Test framework has been improved in order to be able to run unit tests

      • on either chronicle (default) or kafka
      • on either default or stream work manager implementation

      In order to run your tests on kafka you can follow this explanation.

      In order to change the work manager implementation used in unit tests you can define nuxeo.test.workmanager system property to either default or stream.

      For instance, in order to run unit tests on stream work manager backed up by Kafka, just do:

      mvn -Pkafka -Dnuxeo.test.workmanager=stream test
      
      Show
      Test framework has been improved in order to be able to run unit tests on either chronicle (default) or kafka on either default or stream work manager implementation In order to run your tests on kafka you can follow this explanation . In order to change the work manager implementation used in unit tests you can define nuxeo.test.workmanager system property to either default or stream . For instance, in order to run unit tests on stream work manager backed up by Kafka, just do: mvn -Pkafka -Dnuxeo.test.workmanager=stream test
    • Backlog priority:
      1,000
    • Sprint:
      nxcore 10.3.5
    • Story Points:
      3

      Description

      Customer would like to enhance CoreFeature with a WorkManagerConfiguration that offers the ability to configure different WorkManager implementations.

      This CoreFeature enhancement will allow changing the WorkManager implementation by using a specific maven profile or specific property. This is especially significant since the StreamWorkManager implementation behaves so differently from the default WorkManager.

      This enhancement will allow WorkManager-dependent tests to optionally run with a StreamWorkManager implementation, the Chronicle implementation by default and the Kafka implementation as an additional alternative. When a StreamWorkManager-specific profile is enabled, all unit tests that inject a WorkManager or invoke

      Framework.getService(WorkManager.class)
      

      would be provided an instance of the configured StreamWorkManager. Again, this will help ensure that all unit tests execute as expected with the StreamWorkManager enabled.

      The description for NXP-24009 includes the comment:

      To get a full coverage:unit test must be run with the kafka profile.

      Eventhough NXP-24009 is marked "Fixed", it remains unclear how to run unit tests to accomplish the above objective of running all unit tests with the Kafka-based StreamWorkManager enabled. This feature aspires to accomplish the above object.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 6 hours
                  1d 6h