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 2023/01/19 12:11:52 UTC

[GitHub] [camel-k] lburgazzoli opened a new issue, #3992: Set a more reasonable default for gomega eventually's polling interval

lburgazzoli opened a new issue, #3992:
URL: https://github.com/apache/camel-k/issues/3992

   I noticed that in the e2e tests we don't set any value for the eventually's polling interval so by default is likely to be 10ms.
   Given we have tests for which the timeout is  set to minutes it could make sense to set a more reasonable poll interval.
   
   
   The default can be programmatic defined by using `SetDefaultEventuallyPollingInterval` :
   
   ```go
   // SetDefaultEventuallyTimeout sets the default timeout duration for Eventually. Eventually will repeatedly poll your condition until it succeeds, or until this timeout elapses.
   func SetDefaultEventuallyTimeout(t time.Duration) {
       Default.SetDefaultEventuallyTimeout(t)
   }
   
   // SetDefaultEventuallyPollingInterval sets the default polling interval for Eventually.
   func SetDefaultEventuallyPollingInterval(t time.Duration) {
       Default.SetDefaultEventuallyPollingInterval(t)
   }
   ```
   
   or by setting some env vars:
   
   ```go
   const (
       EventuallyTimeoutEnvVarName         = "GOMEGA_DEFAULT_EVENTUALLY_TIMEOUT"
       EventuallyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_EVENTUALLY_POLLING_INTERVAL"
   
       ConsistentlyDurationEnvVarName        = "GOMEGA_DEFAULT_CONSISTENTLY_DURATION"
       ConsistentlyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_POLLING_INTERVAL"
   )
   
   func FetchDefaultDurationBundle() DurationBundle {
       return DurationBundle{
           EventuallyTimeout:         durationFromEnv(EventuallyTimeoutEnvVarName, time.Second),
           EventuallyPollingInterval: durationFromEnv(EventuallyPollingIntervalEnvVarName, 10*time.Millisecond),
   
           ConsistentlyDuration:        durationFromEnv(ConsistentlyDurationEnvVarName, 100*time.Millisecond),
           ConsistentlyPollingInterval: durationFromEnv(ConsistentlyPollingIntervalEnvVarName, 10*time.Millisecond),
       }
   }
   ```


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

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


[GitHub] [camel-k] squakez commented on issue #3992: Set a more reasonable default for gomega eventually's polling interval

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #3992:
URL: https://github.com/apache/camel-k/issues/3992#issuecomment-1401538674

   I don't have any preference. Maybe, using env vars makes it a bit more flexible as we can adjust the value depending on the test suite we run.


-- 
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-k] lburgazzoli commented on issue #3992: Set a more reasonable default for gomega eventually's polling interval

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on issue #3992:
URL: https://github.com/apache/camel-k/issues/3992#issuecomment-1400971261

   What would be the preferred approach ? using env vars or adding something in the e2e support init 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-k] squakez closed issue #3992: Set a more reasonable default for gomega eventually's polling interval

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez closed issue #3992: Set a more reasonable default for gomega eventually's polling interval
URL: https://github.com/apache/camel-k/issues/3992


-- 
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-k] tadayosi commented on issue #3992: Set a more reasonable default for gomega eventually's polling interval

Posted by "tadayosi (via GitHub)" <gi...@apache.org>.
tadayosi commented on issue #3992:
URL: https://github.com/apache/camel-k/issues/3992#issuecomment-1403041099

   I personally think the default 10ms doesn't make much sense for Camel K E2E in any way, it's too frequent to hit K8s API. Probably a sensible default would be 1s or so. What about hardcoding the default interval to 1s (or other appropriate value) but also enabling us to adjust it via the env var?


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