apupier commented on code in PR #9072: URL: https://github.com/apache/camel-quarkus/pull/9072#discussion_r3872692419
########## extensions/jta/deployment/src/test/java/org/apache/camel/quarkus/component/jta/JtaTransactionFailurePropagationTest.java: ########## @@ -0,0 +1,137 @@ +/* + * 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.component.jta; + +import java.util.Arrays; + +import io.quarkus.test.QuarkusUnitTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.transaction.Status; +import jakarta.transaction.SystemException; +import jakarta.transaction.Transaction; +import jakarta.transaction.TransactionManager; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.reset; +import static org.mockito.Mockito.when; + +/** + * A transaction whose rollback, rollback marking or resumption fails must not let that failure disappear, and must not + * let it replace the exception that made the rollback necessary. + */ +public class JtaTransactionFailurePropagationTest { + + @RegisterExtension + static final QuarkusUnitTest CONFIG = new QuarkusUnitTest() Review Comment: is it possible to use the non-deprecated QuarkusExtensionTest class mentioned in javadoc deprecation notice? https://github.com/quarkusio/quarkus/blob/2e48ca4985ebcc4696404cec3c040ed2043f8bca/test-framework/junit-internal/src/main/java/io/quarkus/test/QuarkusUnitTest.java#L17 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
