[ https://issues.apache.org/jira/browse/CAMEL-13491?focusedWorklogId=255045&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-255045 ]
ASF GitHub Bot logged work on CAMEL-13491: ------------------------------------------ Author: ASF GitHub Bot Created on: 06/Jun/19 10:59 Start Date: 06/Jun/19 10:59 Worklog Time Spent: 10m Work Description: davsclaus commented on pull request #2963: CAMEL-13491: Fixed camel-test with isCreateCamelContextPerClass = tru… URL: https://github.com/apache/camel/pull/2963 ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 255045) Time Spent: 20m (was: 10m) > CamelTestSupport.isCreateCamelContextPerClass no longer works for junit4 tests > ------------------------------------------------------------------------------ > > Key: CAMEL-13491 > URL: https://issues.apache.org/jira/browse/CAMEL-13491 > Project: Camel > Issue Type: Bug > Components: camel-test > Affects Versions: 2.23.0 > Reporter: Jan Hallonsten > Priority: Major > Fix For: 3.0.0, 3.0.0.M4 > > Time Spent: 20m > Remaining Estimate: 0h > > With the changes in > org.apache.camel.test.junit4.CamelTestSupport done during the work on > https://issues.apache.org/jira/browse/CAMEL-12534 the camel context is now > recreated for every test regardless of the return value from > isCreateCamelContextPerClass() > . Since junit4 creates a new instance of the class for every test the > variable tests will be recreated and initialized to 0 for every test. > This condition in tearDown will always be true > {code:java} > // code placeholder > if (tests.compareAndSet(v, v - 1)) { > if (v == 1) { > {code} > which stops the camel context after every test. -- This message was sent by Atlassian JIRA (v7.6.3#76005)