You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/06/17 11:17:39 UTC
[GitHub] [camel] JiriOndrusek opened a new pull request, #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
JiriOndrusek opened a new pull request, #7813:
URL: https://github.com/apache/camel/pull/7813
fixes https://issues.apache.org/jira/browse/CAMEL-18201
This PR adds an option to turn off the context stopping. It is possible by junit5's `ConfigurationProperty` (which falls back also to system variable - used in the junit test). If context does not stop automatically method `doSetUp` is not called if context already exists.
I added 2 tests to cover both option values (off and on).
<!-- Uncomment and fill this section if your PR is not trivial
- [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
Below are the contribution guidelines:
https://github.com/apache/camel/blob/main/CONTRIBUTING.md
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] JiriOndrusek commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158789361
Overriding method in CEQ was mt preferred solution, unfortunatelly method I need to override is private static ` private static void doStopCamelContext(`
If making it non-static protected is a better solution, I will use that. (I chose a configurable option, as I saw similar options there)
If you agree, I'll modify the PR to change method signature and allow overriding of it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] JiriOndrusek commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158786585
Functionality may look similar but it is not. PerClass functionality will stop context after each class. This option won't stop context after each class, it will never stop context.
As for the name, I see that it may be a bit unclear, what about `NEVER_STOP_CONTEXT`/`DONT_STOP_CONTEXT` or `SHARE_CONTEXT_FOR_ALL_TEST`/`SHARE_CONTEXT`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] davsclaus commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158869988
There seems to be 1 error now
Failed components/camel-test test test: 14 verified / 1 failed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] JiriOndrusek commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158802258
Thank you! I change only 2 signatures and keep 1 test covering the overriding of both methods.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] JiriOndrusek commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158871024
I'll check it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] github-actions[bot] commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158866631
:x: Finished component verification: **1 component(s) test failed** out of 14 component(s) tested
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] davsclaus merged pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
davsclaus merged PR #7813:
URL: https://github.com/apache/camel/pull/7813
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] JiriOndrusek commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158773469
WDYT? @davsclaus This change will allow camel quarkus to run `CamelTestSupport` based tests (See https://github.com/apache/camel-quarkus/issues/3511) and will allow users to reuse old camel tests in camel-quarkus JVM mode (without need of bigger refactor)..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] davsclaus commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158783575
Hmmm so this seems a bit like the camelContextPerClass functionality that is already there.
And the name of this option is maybe a bit unclear as it will reuse the previous context in the following tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] github-actions[bot] commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158974883
:heavy_check_mark: Finished component verification: 0 component(s) test failed out of **15 component(s) tested**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] davsclaus commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158792662
Yeah its better to make the method protected
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] davsclaus commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158898679
No I dont know how to grab the test logs, @otavioprado knows how-to
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] github-actions[bot] commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158771511
:warning: This PR changes Camel components and will be tested automatically.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] davsclaus commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158786748
Maybe what CEQ needs is being able to override some protected methods in CamelTestSupport to control more fine grained what CEQ needs to do in the doSetup and teardown methods.
Then CEQ can override these methods and do something different.
Maybe the existing doStopCamelContext and setup is useable as-is, eg you can try to implement this in CEQ and then override doStopCamelContext to not stop camel, or only stop when really needed. And doSetup you can then skip calling super if already started.
Then maybe this is possible to just do in CEQ only and keep camel core as-is
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] github-actions[bot] commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158815114
:heavy_check_mark: Finished component verification: 0 component(s) test failed out of **1 component(s) tested**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] JiriOndrusek commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158889702
I see that problem is happening in the `camel-test`, therefore it will be probably caused by the PR.
I can not find any error log and my local execution ends successfully.
Do ou know how to find any information about the failure?
I see in the log:
```
2022-06-17T13:21:21.9391844Z Logging test to /home/runner/work/camel/camel/automated-build-log/components-camel-test.log
2022-06-17T13:21:49.0895677Z Failed components/camel-test test test: 14 verified / 1 failed
2022-06-17T13:21:49.0913884Z There is no log file to copy at target/camel-test-test.log
2022-06-17T13:21:49.0999844Z ##[error]Process completed with exit code 1.
```
My local execution ends with
```
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Camel :: Test :: Parent 3.18.0-SNAPSHOT:
[INFO]
[INFO] Camel :: Test :: Parent ............................ SUCCESS [ 1.214 s]
[INFO] Camel :: Test (deprecated) ......................... SUCCESS [ 15.547 s]
[INFO] Camel :: Test :: CDI (deprecated) .................. SUCCESS [ 4.576 s]
[INFO] Camel :: Test :: JUnit5 ............................ SUCCESS [ 15.502 s]
[INFO] Camel :: Test :: CDI :: JUnit5 ..................... SUCCESS [ 6.283 s]
[INFO] Camel :: Test :: Spring (deprecated) ............... SUCCESS [ 26.590 s]
[INFO] Camel :: Test :: Spring :: JUnit5 .................. SUCCESS [ 29.012 s]
[INFO] Camel :: Test :: Main :: JUnit5 .................... SUCCESS [ 8.806 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:47 min
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] davsclaus commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158829285
LGTM great work @JiriOndrusek
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] github-actions[bot] commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158856852
:x: Finished component verification: **1 component(s) test failed** out of 14 component(s) tested
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] JiriOndrusek commented on pull request #7813: CAMEL-18201 Enhance CamelTestSupport to turn off context stopping
Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on PR #7813:
URL: https://github.com/apache/camel/pull/7813#issuecomment-1158911709
I've found the reason in https://github.com/apache/camel/actions/runs/2515347416
```
[ERROR] Failed to execute goal net.revelc.code.formatter:formatter-maven-plugin:2.17.1:validate (validate) on project camel-test-junit5: File '/home/runner/work/camel/camel/components/camel-test/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/CamelTestSupporOneContextForAllTest.java' has not been previously formatted. Please format file and commit before running validation! -> [Help 1]
```
I'fixed by running `mvn process-resources -Pformat`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org