citrus icon indicating copy to clipboard operation
citrus copied to clipboard

default validators not present in remote-jar

Open turing85 opened this issue 2 years ago • 0 comments

Citrus Version : 3.2.1


Expected behavior:

When we add a validator to our project (e.g. citrus-validation-text), a default validator should be provided and no further configuration is needed.


Actual behavior:

Tests fail with the message

Unable to find proper message validator. Message type is 'PLAINTEXT' and message payload is ...

Reproducer:

  • checkout this git-repository, switch to branch default-validator-not-working

  • build service and tests:

    ./mvnw -Pbuild-citrus-jar package
    
  • deploy the service:

    cd local-deployment && docker compose up -d service && cd ..
    
  • trigger the tests through failsafe:

    ./mvnw -pl citrus verify
    
  • observe that the tests succeed

  • deploy the citrus tests:

    cd local-deployment && docker compose up -d citrus-tests && cd ..
    
  • trigger the tests through the citrus-maven-remote-plugin:

    ./mvn -Ptrigger-citrus-remote -pl citrus verify
    
  • observe that the tests fail


Logs of the two runs on my local machine:

citrus-reports-from-remote-failing.tar.gz citrus-reports-from-surefire-successful.tar.gz


Additional information:

  1. This only happens when a remote jar (and possibly war, haven't tested this) is deployed. Local execution through failsafe works as expected.

  2. We can make the tests succeed by un-commenting this part right here (this will lead to this file being included), which defines a default validator.

  3. In the server logs of the remote execution, I see

    2022-06-01 19:38:52.123  INFO --- [pool-2-thread-1] trationDelegate$BeanPostProcessorChecker : Bean 'referenceResolver' of type [com.consol.citrus.context.SpringBeanReferenceResolver] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    

    Maybe this is related.

turing85 avatar Jun 01 '22 19:06 turing85