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 2021/01/21 08:03:40 UTC

[GitHub] [camel-quarkus] llowinge opened a new issue #2155: Re-think MockBackendUtils class so it is not needed to use it manually

llowinge opened a new issue #2155:
URL: https://github.com/apache/camel-quarkus/issues/2155


   In ideal situation, developer should not know about any need to call https://github.com/apache/camel-quarkus/blob/master/integration-tests-support/mock-backend/src/main/java/org/apache/camel/quarkus/test/mock/backend/MockBackendUtils.java#L49. @jamesnetherton Has maybe some idea how to achieve. This is just umbrella for this effort.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on issue #2155: Re-think MockBackendUtils class so it is not needed to use it manually

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #2155:
URL: https://github.com/apache/camel-quarkus/issues/2155#issuecomment-764574152


   > We should also get rid of `CAMEL_QUARKUS_START_MOCK_BACKEND` because it makes little sense when tests require other environment variables to talk to the real service.
   
   It is true that many tests can autodetect based on the defined env vars whether they should start the mock or run against the real backend. In that sense, `CAMEL_QUARKUS_START_MOCK_BACKEND` can really be seen as useless. However, I think `CAMEL_QUARKUS_START_MOCK_BACKEND` is still useful, when it comes to preventing misconfiguration: Say, a new test comes in for which the tester has not set the env vars yet. IMO, in such situation, `CAMEL_QUARKUS_START_MOCK_BACKEND` is the only way how the tester can figure out that has not configured something yet. Yes, it is more work for the test authors, but IMO it pays back by giving more certainty that the tester is testing against the real backend without any silent fallback to mocks.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on issue #2155: Re-think MockBackendUtils class so it is not needed to use it manually

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on issue #2155:
URL: https://github.com/apache/camel-quarkus/issues/2155#issuecomment-764460311


   IMO we should make `MockBackendUtils` as unintrusive as possible. E.g make it so that test implementors don't need to know anything about it, other than to fulfil a contract as to whether it should print the log `Mock backend will be used` message or not. I.e when a set of required environment variables are present or missing.
   
   We should also get rid of `CAMEL_QUARKUS_START_MOCK_BACKEND` because it makes little sense when tests require other environment variables to talk to the real service.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on issue #2155: Re-think MockBackendUtils class so it is not needed to use it manually

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #2155:
URL: https://github.com/apache/camel-quarkus/issues/2155#issuecomment-764574152


   > We should also get rid of `CAMEL_QUARKUS_START_MOCK_BACKEND` because it makes little sense when tests require other environment variables to talk to the real service.
   
   It is true that many tests can autodetect based on the defined env vars whether they should start the mock or run against the real backend. In that sense, `CAMEL_QUARKUS_START_MOCK_BACKEND` can really be seen as useless. However, I think `CAMEL_QUARKUS_START_MOCK_BACKEND` is still useful, when it comes to preventing misconfiguration: Say, a new test comes in for which the tester has not set the env vars yet. IMO, in such situation, `CAMEL_QUARKUS_START_MOCK_BACKEND` is the only way how the tester can figure out that has not configured something yet. Yes, it is more work for the test authors, but IMO it pays back by giving more certainty that the tester is testing against the real backend without any silent fallback to mocks.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] llowinge commented on issue #2155: Re-think MockBackendUtils class so it is not needed to use it manually

Posted by GitBox <gi...@apache.org>.
llowinge commented on issue #2155:
URL: https://github.com/apache/camel-quarkus/issues/2155#issuecomment-767749705


   I've noticed that the message ("Mock backend will be used") also doesn't print the name of the test/module, which would be also really handy for exclusion by given name. But it would be possible to parse it somehow from log, but i'm not sure how.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on issue #2155: Re-think MockBackendUtils class so it is not needed to use it manually

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on issue #2155:
URL: https://github.com/apache/camel-quarkus/issues/2155#issuecomment-764460311


   IMO we should make `MockBackendUtils` as unintrusive as possible. E.g make it so that test implementors don't need to know anything about it, other than to fulfil a contract as to whether it should print the log `Mock backend will be used` message or not. I.e when a set of required environment variables are present or missing.
   
   We should also get rid of `CAMEL_QUARKUS_START_MOCK_BACKEND` because it makes little sense when tests require other environment variables to talk to the real service.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org