JiriOndrusek commented on code in PR #3847: URL: https://github.com/apache/camel-quarkus/pull/3847#discussion_r916825761
########## test-framework/junit5/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestSupport.java: ########## @@ -0,0 +1,147 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.test; + +import java.util.List; + +import javax.inject.Inject; + +import io.quarkus.test.junit.QuarkusTestProfile; +import org.apache.camel.CamelContext; +import org.apache.camel.RoutesBuilder; +import org.apache.camel.Service; +import org.apache.camel.model.ModelCamelContext; +import org.apache.camel.model.RouteDefinition; +import org.apache.camel.quarkus.core.FastCamelContext; +import org.apache.camel.test.junit5.CamelTestSupport; +import org.junit.jupiter.api.extension.ExtensionContext; + +public class CamelQuarkusTestSupport extends CamelTestSupport + implements QuarkusTestProfile { + + private boolean initialized; + + @Inject + protected CamelContext context; + + @Override + protected CamelContext createCamelContext() throws Exception { Review Comment: From my PoV it would be nice to have this method final. (The whole CQ testing is based on the fact that context is created with the quarkus engine. Code in this PR changes the behavior of the method to use this context) **BUT** I have seen (and used) code like this: ``` @Override protected CamelContext createCamelContext() throws Exception { CamelContext context = super.createCamelContext(); //do something with context return context; } ``` The whole point of this PR is to make transfer from the `CamelTestSupport` way of testing to CQ. Making this method final would make it harder in similar cases. Therefore I vote for **NOT** making this method final. -- 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-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org