You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "christophd (via GitHub)" <gi...@apache.org> on 2024/03/07 09:00:45 UTC

Re: [PR] chore(e2e): Improve E2E tests [camel-k]

christophd commented on code in PR #5188:
URL: https://github.com/apache/camel-k/pull/5188#discussion_r1515787122


##########
pkg/cmd/root.go:
##########
@@ -93,6 +97,10 @@ func kamelPreAddCommandInit(options *RootCmdOptions) *cobra.Command {
 }
 
 func kamelPostAddCommandInit(cmd *cobra.Command) error {
+	// Requires synchronization as viper bind flag is not able to handle concurrency
+	m.Lock()
+	defer m.Unlock()
+

Review Comment:
   @lburgazzoli BTW I ended up fixing the shared Viper instance so each command uses its own instance. Works like a charm now without the need for the lock on the mutex.



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