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 2020/12/22 14:31:02 UTC

[GitHub] [camel-quarkus] llowinge opened a new issue #2090: Twitter itest doesn't work in native mode

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


   I can see
   
   ```
   org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in org.apache.camel.quarkus.component.twitter.CamelTwitterTest that uses java.lang.String was not fulfilled within 15 seconds.
   	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
   	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
   	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
   	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
   	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:864)
   	at org.apache.camel.quarkus.component.twitter.CamelTwitterTest.direct(CamelTwitterTest.java:53)
   ```
   when running 
   `mvn -U -B -e -fae -V -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn verify -f pom.xml -Dformatter.skip -Dimpsort.skip -Denforcer.skip  -Pnative -pl twitter` in integration-tests directory on master branch. The JVM variant works.
   
   Log from Native
   ```
   2020-12-22 15:12:51,812 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Sending direct message to user '@jbossfuseqa': Direct message from camel-quarkus-twitter 509fb6a33ca0404c9d4e1628200766a1
   2020-12-22 15:12:52,262 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Sent direct message to user '@jbossfuseqa': Direct message from camel-quarkus-twitter 509fb6a33ca0404c9d4e1628200766a1
   2020-12-22 15:12:52,370 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Polling direct messages of user '@jbossfuseqa'
   2020-12-22 15:12:53,529 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received direct messages: Tue Dec 22 15:08:57 CET 2020 (879253174347071489) Direct message from camel-quarkus-twitter e8a5945a5e6a485982cdcdb46a480679
   2020-12-22 15:12:56,554 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Polling direct messages of user '@jbossfuseqa'
   2020-12-22 15:12:56,554 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received direct messages: Sun Dec 20 14:18:04 CET 2020 (879253174347071489) Direct message from camel-quarkus-twitter 6cedd3b21f3d4218aa097e3fdc3ce59b
   2020-12-22 15:12:59,565 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Polling direct messages of user '@jbossfuseqa'
   2020-12-22 15:12:59,565 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received direct messages: Fri Dec 18 20:45:45 CET 2020 (879253174347071489) Direct message from camel-quarkus-twitter 71a0d85b2d1b4a8ab7b5adcb29eb1f2a
   2020-12-22 15:13:02,577 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Polling direct messages of user '@jbossfuseqa'
   2020-12-22 15:13:02,577 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received direct messages: Fri Dec 18 20:28:17 CET 2020 (879253174347071489) Direct message from camel-quarkus-twitter 4e31c9b088674c0dbf164d9c9a443994
   2020-12-22 15:13:05,589 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Polling direct messages of user '@jbossfuseqa'
   2020-12-22 15:13:05,589 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received direct messages: Fri Dec 18 20:10:20 CET 2020 (879253174347071489) Direct message from camel-quarkus-twitter 0a09f704e1414d04b1ea25a5b3337715
   2020-12-22 15:13:08,933 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Posted a tweet Hello from camel-quarkus-twitter 7cf342875805483c8353b0102ec5e2bc
   2020-12-22 15:13:10,300 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received tweets from user's timeline: Tue Dec 22 15:13:08 CET 2020 (jbossfuseqa) Hello from camel-quarkus-twitter 7cf342875805483c8353b0102ec5e2bc
   2020-12-22 15:13:20,314 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Searching for keywords on twitter: camel-quarkus-twitter 7cf342875805483c8353b0102ec5e2bc
   2020-12-22 15:13:21,582 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received tweets from twitter search: Tue Dec 22 15:13:08 CET 2020 (jbossfuseqa) Hello from camel-quarkus-twitter 7cf342875805483c8353b0102ec5e2bc
   [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 31.654 s <<< FAILURE! - in org.apache.camel.quarkus.component.twitter.CamelTwitterIT
   ```
   and log from JVM
   ```
   2020-12-22 15:24:10,433 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Sending direct message to user '@jbossfuseqa': Direct message from camel-quarkus-twitter 4f7d1c0fb02546ef85490a9b9511e2e3
   2020-12-22 15:24:11,267 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Sent direct message to user '@jbossfuseqa': Direct message from camel-quarkus-twitter 4f7d1c0fb02546ef85490a9b9511e2e3
   2020-12-22 15:25:11,416 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Polling direct messages of user '@jbossfuseqa'
   2020-12-22 15:25:12,865 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received direct messages: Tue Dec 22 15:24:11 CET 2020 (879253174347071489) Direct message from camel-quarkus-twitter 4f7d1c0fb02546ef85490a9b9511e2e3
   2020-12-22 15:25:13,168 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Posted a tweet Hello from camel-quarkus-twitter 0f3a19e0f7fb448bb9fbb8c77fda7deb
   2020-12-22 15:26:14,846 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received tweets from user's timeline: Tue Dec 22 15:25:13 CET 2020 (jbossfuseqa) Hello from camel-quarkus-twitter 0f3a19e0f7fb448bb9fbb8c77fda7deb
   2020-12-22 15:26:24,860 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Searching for keywords on twitter: camel-quarkus-twitter 0f3a19e0f7fb448bb9fbb8c77fda7deb
   2020-12-22 15:26:26,228 INFO  [org.apa.cam.qua.com.twi.CamelResource] (executor-thread-1) Received tweets from twitter search: Tue Dec 22 15:25:13 CET 2020 (jbossfuseqa) Hello from camel-quarkus-twitter 0f3a19e0f7fb448bb9fbb8c77fda7deb
   ```
   
   


----------------------------------------------------------------
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] lburgazzoli edited a comment on issue #2090: Twitter itest doesn't work in native mode

Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #2090:
URL: https://github.com/apache/camel-quarkus/issues/2090#issuecomment-750131087


   > It is not an issue, it is by design, AFAIK.
   
   but is CamelTwitterTest compiled to native ? I thought it were execute as any other test so by the jvm. And I honestly do not see why it should not work 


----------------------------------------------------------------
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 #2090: Twitter itest doesn't work in native mode

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


   I've found the problem. The inital delay (https://github.com/apache/camel-quarkus/blob/master/integration-tests/twitter/src/test/java/org/apache/camel/quarkus/component/twitter/CamelTwitterTest.java#L36) is zero in Native mode. @ppalaga @jamesnetherton any ideas why ?


----------------------------------------------------------------
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] lburgazzoli commented on issue #2090: Twitter itest doesn't work in native mode

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


   > It is not an issue, it is by design, AFAIK.
   
   but is CamelTwitterTest compiled to native ? I thought it were execute as any other test so by the jvm. 


----------------------------------------------------------------
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 #2090: Twitter itest doesn't work in native mode

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


   > but is CamelTwitterTest compiled to native ? I thought it were execute as any other test so by the jvm. And I honestly do not see why it should not work
   
   Yes, it could be made to work, for some injection values at least. `@ConfigProperty` could work indeed, but `@Inject CamelContext` could not work at all, because in the native mode, the tests run in a process distinct from the one running the application under test. 


----------------------------------------------------------------
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 #2090: Twitter itest doesn't work in native mode

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


   It is not an issue, it is by design, AFAIK. 


----------------------------------------------------------------
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 #2090: Twitter itest doesn't work in native mode

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


   Or even `org.eclipse.microprofile.config.ConfigProvider.getConfig().getValue("test.twitter.delay.initial", Integer.class)` should work in the test.


----------------------------------------------------------------
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 closed issue #2090: Twitter itest doesn't work in native mode

Posted by GitBox <gi...@apache.org>.
ppalaga closed issue #2090:
URL: https://github.com/apache/camel-quarkus/issues/2090


   


----------------------------------------------------------------
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 #2090: Twitter itest doesn't work in native mode

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


   Just for a record, it works with `ConfigProvider.getConfig().getValue`.


----------------------------------------------------------------
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 #2090: Twitter itest doesn't work in native mode

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


   Injection does not work in native mode. We need to find a different way of passing the initial delay value. How about 
   
   ```
   -    @ConfigProperty(name = "test.twitter.delay.initial", defaultValue = "60")
   -    int testTwitterDelayInitial;
   +    int testTwitterDelayInitial = 60;
   ```


----------------------------------------------------------------
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] lburgazzoli commented on issue #2090: Twitter itest doesn't work in native mode

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


   is this a known issue ?


----------------------------------------------------------------
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 #2090: Twitter itest doesn't work in native mode

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


   @ppalaga Thanks. I will try the `ConfigProvider.getConfig().getValue`, i remember i've already used it once before because i wanted to assign the value to static variable.


----------------------------------------------------------------
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 #2090: Twitter itest doesn't work in native mode

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


   Another workaround could be to add a rest endpoint to the test app that would return the ConfigProperty value. `@ConfigProperty` works in the app of course, it only does not work in the test.


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