You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/03/13 20:50:39 UTC
(camel) branch main updated: CAMEL-20341: refactored ContextTestSupport to work like CamelTestSupport
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 409a8c6c2fd CAMEL-20341: refactored ContextTestSupport to work like CamelTestSupport
409a8c6c2fd is described below
commit 409a8c6c2fd6118f9155627aff6a5dc949eaa45d
Author: Craig Ziesman <cr...@gmail.com>
AuthorDate: Wed Mar 13 15:50:32 2024 -0500
CAMEL-20341: refactored ContextTestSupport to work like CamelTestSupport
* refactored ContextTestSupport to work like CamelTestSupport in order to fix brittle unit tests with timing issues
Co-authored-by: Craig Ziesman <cz...@redhat.com>
---
.../java/org/apache/camel/ContextTestSupport.java | 822 ++++++++++++++++++---
.../test/java/org/apache/camel/TestSupport.java | 15 +
.../camel/builder/NotifyBuilderFromRouteTest.java | 14 +-
.../camel/builder/ThreadPoolBuilderTest.java | 4 +-
...seMethodWithMatchingTypeAndSkipSettersTest.java | 4 +-
.../bean/BeanComponentMissingParenthesisTest.java | 4 +-
...entWithPropertiesLookupSetFromEndpointTest.java | 4 +-
.../camel/component/bean/BeanConcurrentTest.java | 4 +-
.../camel/component/bean/BeanEndpointTest.java | 4 +-
.../BeanExchangeAsReturnTypeNotAllowedTest.java | 4 +-
.../bean/BeanExplicitMethodAmbiguousTest.java | 4 +-
.../component/bean/BeanExplicitMethodTest.java | 4 +-
.../bean/BeanExpressionConcurrentTest.java | 4 +-
.../component/bean/BeanImplicitMethodTest.java | 4 +-
.../camel/component/bean/BeanInPipelineTest.java | 4 +-
.../component/bean/BeanInfoSelectMethodTest.java | 4 +-
.../component/bean/BeanInvokeWithNullBodyTest.java | 4 +-
.../camel/component/bean/BeanLifecycleTest.java | 4 +-
.../camel/component/bean/BeanMapPutTest.java | 4 +-
.../bean/BeanMethodValueWithCommaTest.java | 4 +-
.../bean/BeanMethodValueWithExchangeTest.java | 4 +-
...rameterAndNoMethodWithNoParameterIssueTest.java | 4 +-
.../bean/BeanMethodWithStringParameterTest.java | 4 +-
.../component/bean/BeanOgnlPerformanceTest.java | 4 +-
.../bean/BeanParameterInvalidSyntaxTest.java | 4 +-
.../bean/BeanParameterInvalidValueTest.java | 4 +-
.../BeanParameterMethodCallThreeBodyOgnlTest.java | 4 +-
.../bean/BeanParameterNoBeanBindingTest.java | 4 +-
.../bean/BeanParameterThreeBodyOgnlTest.java | 4 +-
.../component/bean/BeanParameterValueOgnlTest.java | 4 +-
.../bean/BeanParameterValueOverloadedTest.java | 4 +-
.../component/bean/BeanParameterValueTest.java | 4 +-
.../camel/component/bean/BeanPipelineTest.java | 4 +-
.../component/bean/BeanPipelineVariablesTest.java | 4 +-
.../component/bean/BeanPropagateHeaderTest.java | 4 +-
.../component/bean/BeanPropertiesFunctionTest.java | 4 +-
.../component/bean/BeanRefMethodNotFoundTest.java | 4 +-
.../camel/component/bean/BeanRefNotFoundTest.java | 4 +-
.../bean/BeanReturnCallableReturnNullTest.java | 4 +-
.../component/bean/BeanReturnCallableTest.java | 4 +-
.../bean/BeanWithAnnotationAndExchangeTest.java | 4 +-
.../bean/BeanWithAnnotationInheritedTest.java | 4 +-
.../BeanWithExchangeExceptionAnnotationTest.java | 4 +-
.../BeanWithExpressionInjectionPredicateTest.java | 4 +-
.../bean/BeanWithExpressionInjectionTest.java | 4 +-
.../camel/component/bean/BeanWithHeaderTest.java | 4 +-
.../bean/BeanWithHeadersAndBodyInject2Test.java | 4 +-
.../bean/BeanWithHeadersAndBodyInject3Test.java | 4 +-
.../bean/BeanWithHeadersAndBodyInjectionTest.java | 4 +-
.../bean/BeanWithInputStreamBodyTest.java | 4 +-
.../component/bean/BeanWithMethodHeaderTest.java | 4 +-
...thPropertiesAndHeadersAndBodyInjectionTest.java | 4 +-
.../BeanWithPropertiesAndHeadersInjectionTest.java | 4 +-
...eanWithPropertiesAndVariablesInjectionTest.java | 4 +-
.../bean/BeanWithVariablesAndBodyInject3Test.java | 4 +-
.../BeanWithVariablesAndBodyInjectionTest.java | 4 +-
...BeanWithXPathInjectionUsingHeaderValueTest.java | 4 +-
.../BeanWithXPathInjectionUsingResultTypeTest.java | 4 +-
.../BodyAnnotationToDisambiguateMethodsTest.java | 4 +-
...entWithPropertiesLookupSetFromEndpointTest.java | 4 +-
.../bean/CustomParameterMappingStrategyTest.java | 4 +-
.../bean/DefaultParameterMappingStrategyTest.java | 4 +-
...ressionAnnotationToDisambiguateMethodsTest.java | 4 +-
.../bean/FileBeanParameterBindingTest.java | 4 +-
.../bean/MethodCallBeanRefMethodNotFoundTest.java | 4 +-
.../bean/MethodCallBeanRefNotFoundTest.java | 4 +-
.../bean/MethodCallByTypeRefExistingBeanTest.java | 4 +-
.../MethodCallRefOrBeanPrefixPredicateTest.java | 4 +-
.../bean/MethodCallRefOrBeanPrefixTest.java | 4 +-
.../component/bean/MockitoMockForClassTest.java | 4 +-
.../bean/MockitoMockForInterfaceTest.java | 4 +-
.../component/bean/MockitoSpyForClassTest.java | 4 +-
.../camel/component/bean/MyCurrencyBeanTest.java | 4 +-
.../camel/component/bean/NewInstanceTest.java | 2 +-
.../camel/component/bean/PredicateAsBeanTest.java | 4 +-
...nguageBeanFunctionMethodValueWithCommaTest.java | 4 +-
...BeanFunctionMethodValueWithParenthesisTest.java | 4 +-
.../bean/SimpleLanguageBeanFunctionScopeTest.java | 2 +-
.../bean/issues/BeanRouteToDerivedClassTest.java | 4 +-
.../issues/BeanVsProcessorPerformanceTest.java | 4 +-
.../bean/issues/FilterBeanRegistryTest.java | 4 +-
.../component/dataset/BigDataSetManualTest.java | 4 +-
.../camel/component/dataset/CustomDataSetTest.java | 4 +-
.../component/dataset/DataSetConsumerTest.java | 4 +-
.../component/dataset/DataSetPreloadTest.java | 4 +-
.../component/dataset/DataSetProducerTest.java | 4 +-
.../camel/component/dataset/DataSetSedaTest.java | 4 +-
.../camel/component/dataset/DataSetTest.java | 4 +-
.../component/dataset/FileDataSetConsumerTest.java | 4 +-
.../dataset/FileDataSetConsumerWithSplitTest.java | 4 +-
.../component/dataset/FileDataSetProducerTest.java | 4 +-
.../dataset/FileDataSetProducerWithSplitTest.java | 4 +-
.../component/dataset/ListDataSetConsumerTest.java | 4 +-
.../component/dataset/ListDataSetProducerTest.java | 4 +-
.../component/dataset/RoutePerformanceTest.java | 4 +-
.../file/AntPathMatcherGenericFileFilterTest.java | 4 +-
.../camel/component/file/BeanToFileTest.java | 4 +-
.../file/FileBeginFailureOneTimeTest.java | 4 +-
...ileConsumerBridgeRouteExceptionHandlerTest.java | 4 +-
.../file/FileConsumerCommitRenameStrategyTest.java | 3 +-
.../FileConsumerCustomExceptionHandlerTest.java | 4 +-
.../file/FileConsumerCustomSchedulerTest.java | 4 +-
.../file/FileConsumerDirectoryFilterTest.java | 4 +-
.../file/FileConsumerFileExpressionTest.java | 4 +-
...leConsumerFileExpressionThrowExceptionTest.java | 4 +-
.../component/file/FileConsumerFileFilterTest.java | 4 +-
.../file/FileConsumerIdempotentRefTest.java | 4 +-
.../file/FileConsumerMoveExpressionTest.java | 4 +-
.../file/FileConsumerPollStrategyNotBeginTest.java | 4 +-
...FileConsumerPollStrategyPolledMessagesTest.java | 4 +-
...umerPollStrategyRollbackThrowExceptionTest.java | 4 +-
...FileConsumerPollStrategyStopOnRollbackTest.java | 4 +-
.../file/FileConsumerPollStrategyTest.java | 4 +-
...rFileRecursiveFilterDeleteOldLockFilesTest.java | 4 +-
.../component/file/FileProducerExpressionTest.java | 4 +-
.../file/FileProducerMoveExistingStrategyTest.java | 4 +-
.../file/FileProducerRenameUsingCopyTest.java | 5 +-
.../component/file/FileSortByExpressionTest.java | 8 +-
.../camel/component/file/FileSorterRefTest.java | 4 +-
.../FilerConsumerMoveFailedDoneFileNameTest.java | 5 +-
.../file/FilerProducerDoneFileNameRouteTest.java | 4 +-
.../file/FilerProducerDoneFileNameTest.java | 4 +-
.../camel/component/file/ToFileRouteTest.java | 4 +-
.../FileIdempotentReadLockDelayedAsyncTest.java | 4 +-
.../FileIdempotentReadLockDelayedTest.java | 4 +-
.../file/strategy/FileIdempotentReadLockTest.java | 4 +-
.../language/LanguageScriptRouteTest.java | 4 +-
.../camel/component/mock/MockEndpointTest.java | 4 +-
.../PropertiesComponentOnExceptionTest.java | 4 +-
...rtiesComponentSomethingElseBoundToJndiTest.java | 4 +-
.../component/rest/FromRestAdviceWithTest.java | 4 +-
.../camel/component/rest/FromRestApiTest.java | 4 +-
.../component/rest/FromRestConfigurationTest.java | 4 +-
.../component/rest/FromRestDefaultValueTest.java | 4 +-
.../component/rest/FromRestDisabledAllTest.java | 4 +-
.../camel/component/rest/FromRestDisabledTest.java | 4 +-
.../component/rest/FromRestDuplicateTest.java | 4 +-
.../component/rest/FromRestGetContentTypeTest.java | 4 +-
.../rest/FromRestGetCorsAllowCredentialsTest.java | 4 +-
.../component/rest/FromRestGetCorsCustomTest.java | 4 +-
.../camel/component/rest/FromRestGetCorsTest.java | 4 +-
.../rest/FromRestGetHttpErrorCodeTest.java | 4 +-
.../component/rest/FromRestGetInterceptTest.java | 4 +-
.../component/rest/FromRestGetOnExceptionTest.java | 4 +-
.../rest/FromRestGetPlaceholderParamTest.java | 4 +-
.../component/rest/FromRestGetPolicyTest.java | 4 +-
.../camel/component/rest/FromRestGetTest.java | 4 +-
.../component/rest/FromRestInlineRoutesTest.java | 4 +-
.../rest/FromRestPathPlaceholderTest.java | 4 +-
.../rest/RestComponentVerifierExtensionTest.java | 4 +-
.../component/rest/RestComponentVerifierTest.java | 4 +-
.../component/scheduler/SchedulerRouteTest.java | 4 +-
.../component/seda/SedaBlockWhenFullTest.java | 5 +-
.../seda/SedaConcurrentConsumersTest.java | 4 +-
.../seda/SedaConsumerSuspendResumeTest.java | 7 +
.../seda/SedaDefaultBlockWhenFullTest.java | 4 +-
.../component/timer/TimerGracefulShutdownTest.java | 4 +-
.../timer/TimerReferenceConfigurationTest.java | 4 +-
.../camel/component/timer/TimerRouteTest.java | 4 +-
.../validator/CustomSchemaFactoryFeatureTest.java | 4 +-
.../component/validator/ValidatorBeanCallTest.java | 4 +-
.../ValidatorResourceResolverFactoryTest.java | 2 +-
.../xslt/XsltCustomizeEntityResolverTest.java | 4 +-
.../xslt/XsltCustomizeURIResolverTest.java | 4 +-
.../apache/camel/component/xslt/XsltRouteTest.java | 4 +-
.../component/xslt/XsltUriResolverFactoryTest.java | 2 +-
.../camel/converter/FallbackPromoteTest.java | 5 -
.../converter/StaticFallbackConverterTest.java | 5 -
.../camel/impl/BeanInjectRouteBuilderTest.java | 4 +-
.../CamelContextAddRestDefinitionsFromXmlTest.java | 4 +-
.../CamelProduceInterfaceEventNotifierTest.java | 2 +-
.../camel/impl/DataFormatContextAwareTest.java | 4 +-
.../impl/DataFormatPropertyPlaceholderTest.java | 4 +-
...amelBeanPostProcessorComplexFieldFirstTest.java | 10 +-
.../DefaultCamelContextSuspendResumeRouteTest.java | 6 +
.../impl/DefaultComponentAutowiredFalseTest.java | 4 +-
.../camel/impl/DefaultComponentAutowiredTest.java | 4 +-
.../DefaultComponentReferencePropertiesTest.java | 4 +-
.../apache/camel/impl/DefaultComponentTest.java | 5 +-
.../camel/impl/LanguageCamelContextAwareTest.java | 4 +-
.../camel/impl/LogDebugBodyMaxCharsOffTest.java | 4 +-
.../camel/impl/LogDebugBodyMaxCharsTest.java | 4 +-
.../apache/camel/impl/LogDebugBodyStreamsTest.java | 4 +-
.../org/apache/camel/impl/RefDataFormatTest.java | 4 +-
.../camel/impl/RouteIdRestDefinitionTest.java | 4 +-
.../camel/impl/RoutePolicyRefCallbackTest.java | 4 +-
.../camel/impl/RouteSedaSuspendResumeTest.java | 1 +
.../StartupListenerComponentFromRegistryTest.java | 4 +-
.../camel/impl/TwoRouteSuspendResumeTest.java | 6 +
.../impl/engine/CamelPostProcessorHelperTest.java | 2 +-
.../event/CamelEventsTimestampEnabledTest.java | 2 +-
.../event/EventNotifierExchangeCompletedTest.java | 2 +-
.../impl/event/EventNotifierExchangeSentTest.java | 2 +-
.../EventNotifierFailureHandledEventsTest.java | 2 +-
.../event/EventNotifierRedeliveryEventsTest.java | 2 +-
.../event/MultipleEventNotifierEventsTest.java | 2 +-
...tScopedOnExceptionErrorHandlerRefIssueTest.java | 4 +-
...ExceptionErrorHandlerRefIssueTwoRoutesTest.java | 4 +-
...xceptionNotHandledErrorHandlerRefIssueTest.java | 4 +-
...otHandledErrorHandlerRefIssueTwoRoutesTest.java | 4 +-
...HandledRouteScopedErrorHandlerRefIssueTest.java | 4 +-
...uteScopedErrorHandlerRefIssueTwoRoutesTest.java | 4 +-
...ceptionRouteScopedErrorHandlerRefIssueTest.java | 4 +-
...uteScopedErrorHandlerRefIssueTwoRoutesTest.java | 4 +-
.../OnExceptionErrorHandlerRefIssueTest.java | 4 +-
...ExceptionErrorHandlerRefIssueTwoRoutesTest.java | 4 +-
...xceptionNotHandledErrorHandlerRefIssueTest.java | 4 +-
...otHandledErrorHandlerRefIssueTwoRoutesTest.java | 4 +-
...HandledRouteScopedErrorHandlerRefIssueTest.java | 4 +-
...uteScopedErrorHandlerRefIssueTwoRoutesTest.java | 4 +-
...ceptionRouteScopedErrorHandlerRefIssueTest.java | 4 +-
...uteScopedErrorHandlerRefIssueTwoRoutesTest.java | 4 +-
.../camel/issues/OnExceptionWithTwoBeansTest.java | 2 +-
...eOriginalMessageEndpointExceptionIssueTest.java | 4 +-
...etryRouteScopedUntilRecipientListIssueTest.java | 4 +-
...ScopedOnExceptionMultipleRouteBuildersTest.java | 2 +-
.../camel/issues/SedaFileIdempotentIssueTest.java | 4 +-
.../camel/issues/SetHeaderInDoCatchIssueTest.java | 2 +-
...terUsingBeanReturningCloseableIteratorTest.java | 4 +-
.../SplitterUsingBeanReturningMessageTest.java | 4 +-
.../camel/issues/TryCatchWithSplitIssueTest.java | 4 +-
.../language/BeanAnnotationParameterTest.java | 4 +-
.../language/BeanAnnotationParameterTwoTest.java | 4 +-
...LWithDotInParameterPropertyPlaceholderTest.java | 4 +-
.../BeanLanguageOGNLWithDotInParameterTest.java | 4 +-
.../apache/camel/language/BeanLanguageTest.java | 4 +-
.../java/org/apache/camel/language/BeanTest.java | 4 +-
.../apache/camel/language/FileLanguageTest.java | 4 +-
.../apache/camel/language/LanguageServiceTest.java | 4 +-
.../org/apache/camel/language/RefLanguageTest.java | 4 +-
.../apache/camel/language/RefPredicateTest.java | 4 +-
.../java/org/apache/camel/language/RefTest.java | 4 +-
.../camel/language/simple/SimpleOperatorTest.java | 4 +-
.../language/simple/SimpleParserPredicateTest.java | 4 +-
.../apache/camel/language/simple/SimpleTest.java | 4 +-
.../BeanOgnMethodWithXPathInjectionTest.java | 4 +-
.../BeanRecipientListInterfaceAnnotationTest.java | 4 +-
.../camel/processor/BeanRecipientListTest.java | 4 +-
.../processor/BeanRecipientListTimeoutTest.java | 4 +-
.../org/apache/camel/processor/BeanRouteTest.java | 4 +-
.../apache/camel/processor/BeanSingletonTest.java | 2 +-
.../camel/processor/BeanWithExceptionTest.java | 4 +-
.../BeanWithXPathInjectionPreCompileTest.java | 4 +-
.../processor/BeanWithXPathInjectionTest.java | 4 +-
.../CBRPredicateBeanThrowExceptionTest.java | 4 +-
.../org/apache/camel/processor/ClaimCheckTest.java | 4 +-
.../processor/ComposedMessageProcessorTest.java | 4 +-
.../CustomConsumerExceptionHandlerTest.java | 4 +-
.../camel/processor/CustomRefLoadBalanceTest.java | 4 +-
.../processor/DataFormatServiceCustomRefTest.java | 4 +-
.../DeadLetterChannelAlwaysHandledTest.java | 4 +-
.../DeadLetterChannelRestartFromBeginningTest.java | 4 +-
.../DefinitionPolicyPerProcessorTest.java | 4 +-
.../org/apache/camel/processor/DetourTest.java | 4 +-
.../processor/ErrorHandlerWrappedEachNodeTest.java | 4 +-
.../apache/camel/processor/MethodFilterTest.java | 4 +-
.../camel/processor/MethodFilterVariableTest.java | 4 +-
.../org/apache/camel/processor/NormalizerTest.java | 4 +-
.../camel/processor/PolicyPerProcessorTest.java | 4 +-
.../apache/camel/processor/PolicyPerRouteTest.java | 4 +-
.../processor/RecipientListBeanOnPrepareTest.java | 4 +-
.../camel/processor/RecipientListBeanTest.java | 4 +-
.../RecipientListFineGrainedErrorHandlingTest.java | 4 +-
...ntListParallelFineGrainedErrorHandlingTest.java | 4 +-
.../processor/RecipientListReturnValueTest.java | 4 +-
.../camel/processor/RoutePoliciesRefTest.java | 4 +-
.../org/apache/camel/processor/SimulatorTest.java | 4 +-
.../camel/processor/SplitAggregateInOutTest.java | 4 +-
.../processor/SplitRefCustomExpressionTest.java | 4 +-
.../camel/processor/SplitterMethodCallTest.java | 4 +-
.../apache/camel/processor/SplitterPojoTest.java | 4 +-
.../StreamCachingSpoolDirectoryQuarkusTest.java | 3 +-
.../TryCatchCaughtExceptionFinallyTest.java | 4 +-
.../processor/TryCatchCaughtExceptionTest.java | 4 +-
.../TryCatchCaughtExceptionTwoTimesTest.java | 4 +-
.../processor/TryFinallyCaughtExceptionTest.java | 4 +-
.../camel/processor/UnitOfWorkProducerTest.java | 2 +-
.../processor/WireTapBeanAsProcessorTest.java | 4 +-
.../camel/processor/WireTapOnPrepareRefTest.java | 4 +-
.../camel/processor/WireTapShutdownBeanTest.java | 4 +-
.../camel/processor/WireTapShutdownRouteTest.java | 4 +-
.../camel/processor/WireTapVoidBeanTest.java | 4 +-
.../aggregator/AbstractDistributedTest.java | 4 +-
.../AggregateForceCompletionOnStopTest.java | 4 +-
...gationStrategyBeanAdapterRefMethodNameTest.java | 4 +-
.../AggregationStrategyBeanAdapterRefTest.java | 4 +-
.../AsyncEndpointEventNotifierSendingTest.java | 2 +-
.../async/AsyncEndpointEventNotifierTest.java | 2 +-
.../processor/async/AsyncEndpointPolicyTest.java | 4 +-
.../async/AsyncEndpointRecipientListBean3Test.java | 4 +-
.../async/AsyncEndpointRecipientListBean4Test.java | 4 +-
.../async/AsyncEndpointRecipientListBeanTest.java | 4 +-
...tRecipientListFineGrainedErrorHandlingTest.java | 4 +-
.../async/AsyncEndpointRoutingSlipBean2Test.java | 4 +-
.../async/AsyncEndpointRoutingSlipBean3Test.java | 4 +-
...syncEndpointRoutingSlipBeanNonBlockingTest.java | 4 +-
.../async/AsyncEndpointRoutingSlipBeanTest.java | 4 +-
...sorAwaitManagerInterruptWithRedeliveryTest.java | 4 +-
.../enricher/EnricherAggregateStreamingTest.java | 4 +-
.../processor/enricher/EnricherBiFunctionTest.java | 4 +-
.../enricher/EnricherRefBeanClassTest.java | 4 +-
.../enricher/EnricherRefBeanTypeTest.java | 4 +-
.../camel/processor/enricher/EnricherRefTest.java | 4 +-
.../enricher/PollEnrichBridgeErrorHandlerTest.java | 4 +-
.../processor/enricher/PollEnricherRefTest.java | 4 +-
.../CustomExceptionPolicyStrategyTest.java | 4 +-
...ScopedOnExceptionLoadBalancerStopRouteTest.java | 6 +-
...efaultErrorHandlerExchangeFormatterRefTest.java | 4 +-
...rorHandlerOnExceptionOccurredProcessorTest.java | 4 +-
.../DefaultErrorHandlerRetryWhileTest.java | 4 +-
.../onexception/OnExceptionComplexRouteTest.java | 4 +-
.../onexception/OnExceptionFromChoiceTest.java | 4 +-
.../OnExceptionFromChoiceUseOriginalBodyTest.java | 4 +-
...nExceptionOccurredProcessorOnExceptionTest.java | 4 +-
.../OnExceptionOccurredProcessorTest.java | 4 +-
.../onexception/OnExceptionRetryUntilTest.java | 4 +-
...ptionRetryUntilWithDefaultErrorHandlerTest.java | 4 +-
.../onexception/OnExceptionRouteTest.java | 4 +-
...nExceptionRouteWithDefaultErrorHandlerTest.java | 4 +-
.../RoutingSlipDataModificationTest.java | 4 +-
.../routingslip/RoutingSlipWithExceptionTest.java | 4 +-
.../concurrent/ThrottlerMethodCallTest.java | 4 +-
.../validator/BeanValidatorInputValidateTest.java | 4 +-
.../validator/BeanValidatorOutputValidateTest.java | 4 +-
...ndiCamelSingletonInitialContextFactoryTest.java | 2 +-
.../apache/camel/util/CamelContextHelperTest.java | 4 +-
.../util/DumpModelAsXmlDanishCharactersTest.java | 4 +-
.../util/DumpModelAsXmlRouteExpressionTest.java | 4 +-
.../util/DumpModelAsXmlRoutePredicateTest.java | 4 +-
.../JmxNotificationEventNotifierTest.java | 2 +-
.../camel/management/LoggingEventNotifierTest.java | 2 +-
.../management/ManagedCustomLoadBalancerTest.java | 4 +-
.../camel/management/ManagedProcessTest.java | 4 +-
.../camel/management/PublishEventNotifierTest.java | 2 +-
.../PublishEventNotifierToRouteTest.java | 2 +-
.../camel/management/RemoveEventNotifierTest.java | 2 +-
.../xml/jaxb/definition/LoadRestFromXmlTest.java | 4 +-
.../LoadRouteFromXmlWithOnExceptionTest.java | 4 +-
.../definition/LoadRouteFromXmlWithPolicyTest.java | 4 +-
339 files changed, 1413 insertions(+), 752 deletions(-)
diff --git a/core/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java b/core/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
index 4313f91a1e5..2fb47363da5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
+++ b/core/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
@@ -16,45 +16,131 @@
*/
package org.apache.camel;
+import java.lang.annotation.Annotation;
+import java.net.URISyntaxException;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import javax.naming.Context;
+import org.apache.camel.builder.AdviceWith;
+import org.apache.camel.builder.AdviceWithRouteBuilder;
import org.apache.camel.builder.NotifyBuilder;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.InterceptSendToMockEndpointStrategy;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.component.seda.SedaComponent;
import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.debugger.DefaultDebugger;
+import org.apache.camel.model.Model;
import org.apache.camel.model.ModelCamelContext;
+import org.apache.camel.model.ProcessorDefinition;
+import org.apache.camel.spi.CamelBeanPostProcessor;
import org.apache.camel.spi.Language;
+import org.apache.camel.spi.PropertiesComponent;
+import org.apache.camel.spi.PropertiesSource;
import org.apache.camel.spi.Registry;
+import org.apache.camel.support.BreakpointSupport;
import org.apache.camel.support.DefaultRegistry;
+import org.apache.camel.support.EndpointHelper;
+import org.apache.camel.support.PluginHelper;
import org.apache.camel.support.jndi.JndiTest;
+import org.apache.camel.util.StopWatch;
+import org.apache.camel.util.StringHelper;
+import org.apache.camel.util.TimeUtils;
+import org.apache.camel.util.URISupport;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.AfterTestExecutionCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.BeforeTestExecutionCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.RegisterExtension;
import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* A useful base class which creates a {@link CamelContext} with some routes along with a {@link ProducerTemplate} for
- * use in the test case
+ * use in core test cases
*/
-public abstract class ContextTestSupport extends TestSupport {
-
+public abstract class ContextTestSupport extends TestSupport
+ implements BeforeEachCallback, AfterEachCallback, BeforeTestExecutionCallback, AfterTestExecutionCallback {
+
+ private static final ThreadLocal<ModelCamelContext> THREAD_CAMEL_CONTEXT = new ThreadLocal<>();
+ private static final ThreadLocal<ProducerTemplate> THREAD_TEMPLATE = new ThreadLocal<>();
+ private static final ThreadLocal<FluentProducerTemplate> THREAD_FLUENT_TEMPLATE = new ThreadLocal<>();
+ private static final ThreadLocal<ConsumerTemplate> THREAD_CONSUMER = new ThreadLocal<>();
+ private static final ThreadLocal<Service> THREAD_SERVICE = new ThreadLocal<>();
+ public static final String SEPARATOR = "********************************************************************************";
+ protected Properties extra;
protected volatile ModelCamelContext context;
protected volatile ProducerTemplate template;
+ protected volatile FluentProducerTemplate fluentTemplate;
protected volatile ConsumerTemplate consumer;
+ protected volatile Service camelContextService;
protected volatile NotifyBuilder oneExchangeDone;
+
+ private boolean applyCamelPostProcessor = false;
private boolean useRouteBuilder = true;
- private Service camelContextService;
+ private final DebugBreakpoint breakpoint = new DebugBreakpoint();
+ private final Map<String, String> fromEndpoints = new HashMap<>();
+
+ private final StopWatch watch = new StopWatch();
+ private String currentTestName;
+ private ExtensionContext.Store contextStore;
+
+ @RegisterExtension
+ protected ContextTestSupport contextTestSupportExtension = this;
+
+ @Override
+ public void beforeTestExecution(ExtensionContext context) throws Exception {
+ watch.restart();
+ }
+
+ @Override
+ public void afterTestExecution(ExtensionContext context) throws Exception {
+ watch.taken();
+ }
+
+ public long timeTaken() {
+ return watch.taken();
+ }
+
+ @Override
+ public void beforeEach(ExtensionContext context) throws Exception {
+ currentTestName = context.getDisplayName();
+ contextStore = context.getStore(ExtensionContext.Namespace.create(getClass(), context));
+ }
+
+ @Override
+ public void afterEach(ExtensionContext context) throws Exception {
+ DefaultCamelContext.clearOptions();
+ }
+
+ /**
+ * Apply the Camel PostProcessor or not
+ *
+ * @return <tt>true</tt> then {@link CamelBeanPostProcessor} will be applied to this instance, <tt>false</tt> then
+ * {@link CamelBeanPostProcessor} will <b>not</b> be applied
+ */
+ public boolean isApplyCamelPostProcessor() {
+ return applyCamelPostProcessor;
+ }
+
+ public void setApplyCamelPostProcessor(boolean applyCamelPostProcessor) {
+ this.applyCamelPostProcessor = applyCamelPostProcessor;
+ }
/**
* Use the RouteBuilder or not
*
- * @return If the return value is true, the camel context will be started in the setup method. If the return value
- * is false, the camel context will not be started in the setup method.
+ * @return <tt>true</tt> then {@link CamelContext} will be auto started, <tt>false</tt> then {@link CamelContext}
+ * will <b>not</b> be auto started (you will have to start it manually)
*/
public boolean isUseRouteBuilder() {
return useRouteBuilder;
@@ -64,23 +150,151 @@ public abstract class ContextTestSupport extends TestSupport {
this.useRouteBuilder = useRouteBuilder;
}
- public Service getCamelContextService() {
- return camelContextService;
+ /**
+ * Override when using <a href="http://camel.apache.org/advicewith.html">advice with</a> and return <tt>true</tt>.
+ * This helps knowing advice with is to be used, and {@link CamelContext} will not be started before the advice with
+ * takes place. This helps by ensuring the advice with has been property setup before the {@link CamelContext} is
+ * started
+ * <p/>
+ * <b>Important:</b> Its important to start {@link CamelContext} manually from the unit test after you are done
+ * doing all the advice with.
+ *
+ * @return <tt>true</tt> if you use advice with in your unit tests.
+ */
+ public boolean isUseAdviceWith() {
+ return false;
}
/**
- * Allows a service to be registered a separate lifecycle service to start and stop the context; such as for Spring
- * when the ApplicationContext is started and stopped, rather than directly stopping the CamelContext
+ * Override to enable auto mocking endpoints based on the pattern.
+ * <p/>
+ * Return <tt>*</tt> to mock all endpoints.
+ *
+ * @see EndpointHelper#matchEndpoint(CamelContext, String, String)
*/
- public void setCamelContextService(Service camelContextService) {
- this.camelContextService = camelContextService;
+ public String isMockEndpoints() {
+ return null;
}
/**
- * Convenient api to create a NotifyBuilder to be notified of a specific event
+ * Override to enable auto mocking endpoints based on the pattern, and <b>skip</b> sending to original endpoint.
+ * <p/>
+ * Return <tt>*</tt> to mock all endpoints.
+ *
+ * @see EndpointHelper#matchEndpoint(CamelContext, String, String)
*/
- protected NotifyBuilder event() {
- return new NotifyBuilder(context);
+ public String isMockEndpointsAndSkip() {
+ return null;
+ }
+
+ /**
+ * Sets the assert period on all the Mock endpoints
+ */
+ protected void setAssertPeriod(long period) {
+ MockEndpoint.setAssertPeriod(context, period);
+ }
+
+ public void replaceRouteFromWith(String routeId, String fromEndpoint) {
+ fromEndpoints.put(routeId, fromEndpoint);
+ }
+
+ /**
+ * Used for filtering routes matching the given pattern, which follows the following rules:
+ * <p>
+ * - Match by route id - Match by route input endpoint uri
+ * <p>
+ * The matching is using exact match, by wildcard and regular expression.
+ * <p>
+ * For example to only include routes which starts with foo in their route id's, use: include=foo* And to
+ * exclude routes which starts from JMS endpoints, use: exclude=jms:*
+ * <p>
+ * Multiple patterns can be separated by comma, for example to exclude both foo and bar routes, use:
+ * exclude=foo*,bar*
+ * <p>
+ * Exclude takes precedence over include.
+ */
+ public String getRouteFilterIncludePattern() {
+ return null;
+ }
+
+ /**
+ * Used for filtering routes matching the given pattern, which follows the following rules:
+ * <p>
+ * - Match by route id - Match by route input endpoint uri
+ * <p>
+ * The matching is using exact match, by wildcard and regular expression.
+ * <p>
+ * For example to only include routes which starts with foo in their route id's, use: include=foo* And to
+ * exclude routes which starts from JMS endpoints, use: exclude=jms:*
+ * <p>
+ * Multiple patterns can be separated by comma, for example to exclude both foo and bar routes, use:
+ * exclude=foo*,bar*
+ * <p>
+ * Exclude takes precedence over include.
+ */
+ public String getRouteFilterExcludePattern() {
+ return null;
+ }
+
+ protected List<Processor> getProcessors(String pattern) {
+ return context.getRoutes().stream()
+ .flatMap(r -> r.filter(pattern).stream()).collect(Collectors.toList());
+ }
+
+ /**
+ * Gets the name of the current test being executed.
+ */
+ public final String getCurrentTestName() {
+ return currentTestName;
+ }
+
+ /**
+ * Gets the name of the current test being executed.
+ */
+ public final ExtensionContext.Store getContextStore() {
+ return contextStore;
+ }
+
+ /**
+ * Override to enable debugger
+ * <p/>
+ * Is default <tt>false</tt>
+ */
+ public boolean isUseDebugger() {
+ return false;
+ }
+
+ public Service getCamelContextService() {
+ return camelContextService;
+ }
+
+ public Service camelContextService() {
+ return camelContextService;
+ }
+
+ public CamelContext context() {
+ return context;
+ }
+
+ public ProducerTemplate template() {
+ return template;
+ }
+
+ public FluentProducerTemplate fluentTemplate() {
+ return fluentTemplate;
+ }
+
+ public ConsumerTemplate consumer() {
+ return consumer;
+ }
+
+ /**
+ * Allows a service to be registered a separate lifecycle service to start and stop the context; such as for Spring
+ * when the ApplicationContext is started and stopped, rather than directly stopping the CamelContext
+ */
+ public void setCamelContextService(Service service) {
+ camelContextService = service;
+ THREAD_SERVICE.set(camelContextService);
}
@Override
@@ -88,69 +302,251 @@ public abstract class ContextTestSupport extends TestSupport {
public void setUp() throws Exception {
super.setUp();
- CamelContext c2 = createCamelContext();
- if (c2 instanceof ModelCamelContext) {
- context = (ModelCamelContext) c2;
+ log.info(SEPARATOR);
+ log.info("Testing: {} ({})", getCurrentTestName(), getClass().getName());
+ log.info(SEPARATOR);
+
+ doSpringBootCheck();
+ doQuarkusCheck();
+
+ setupResources();
+ doPreSetup();
+ doSetUp();
+ doPostSetup();
+
+ // create a default notifier when 1 exchange is done which is the most
+ // common case
+ oneExchangeDone = event().whenDone(1).create();
+
+ // only start timing after all the setup
+ watch.restart();
+ }
+
+ /**
+ * Strategy to perform any pre setup, before {@link CamelContext} is created
+ */
+ protected void doPreSetup() throws Exception {
+ // noop
+ }
+
+ /**
+ * Strategy to perform any post setup after {@link CamelContext} is created
+ */
+ protected void doPostSetup() throws Exception {
+ // noop
+ }
+
+ /**
+ * Detects if this is a Spring-Boot test and throws an exception, as these base classes is not intended for testing
+ * Camel on Spring Boot.
+ */
+ protected void doSpringBootCheck() {
+ boolean springBoot = hasClassAnnotation("org.springframework.boot.test.context.SpringBootTest");
+ if (springBoot) {
+ throw new RuntimeException(
+ "Spring Boot detected: The ContextTestSupport/CamelSpringTestSupport class is not intended for Camel testing with Spring Boot.");
+ }
+ }
+
+ /**
+ * Detects if this is a Camel-quarkus test and throw an exception, as these base classes is not intended for testing
+ * Camel onQuarkus.
+ */
+ protected void doQuarkusCheck() {
+ boolean quarkus = hasClassAnnotation("io.quarkus.test.junit.QuarkusTest") ||
+ hasClassAnnotation("org.apache.camel.quarkus.test.CamelQuarkusTest");
+ if (quarkus) {
+ throw new RuntimeException(
+ "Quarkus detected: The ContextTestSupport/CamelSpringTestSupport class is not intended for Camel testing with Quarkus.");
+ }
+ }
+
+ protected void doSetUp() throws Exception {
+ log.debug("setUp test");
+ // jmx is enabled if we have configured to use it or if
+ // the component camel-debug is in the classpath
+ if (useJmx() || isCamelDebugPresent()) {
+ enableJMX();
} else {
- throw new Exception("Context must be a ModelCamelContext");
+ disableJMX();
}
- assertValidContext(context);
- context.build();
+ context = (ModelCamelContext) createCamelContext();
+ THREAD_CAMEL_CONTEXT.set(context);
+
+ assertNotNull(context, "No context found!");
+
+ // add custom beans
+ bindToRegistry(context.getRegistry());
+
+ // reduce default shutdown timeout to avoid waiting for 300 seconds
+ context.getShutdownStrategy().setTimeout(getShutdownTimeout());
+
+ // set debugger if enabled
+ if (isUseDebugger()) {
+ if (context.getStatus().equals(ServiceStatus.Started)) {
+ log.info("Cannot setting the Debugger to the starting CamelContext, stop the CamelContext now.");
+ // we need to stop the context first to setup the debugger
+ context.stop();
+ }
+ context.setDebugging(true);
+ context.setDebugger(new DefaultDebugger());
+ context.getDebugger().addBreakpoint(breakpoint);
+ // when stopping CamelContext it will automatically remove the breakpoint
+ }
// make SEDA run faster
context.getComponent("seda", SedaComponent.class).setDefaultPollTimeout(10);
template = context.createProducerTemplate();
+ template.start();
+ fluentTemplate = context.createFluentProducerTemplate();
+ fluentTemplate.start();
consumer = context.createConsumerTemplate();
+ consumer.start();
+
+ THREAD_TEMPLATE.set(template);
+ THREAD_FLUENT_TEMPLATE.set(fluentTemplate);
+ THREAD_CONSUMER.set(consumer);
+
+ // enable auto mocking if enabled
+ String pattern = isMockEndpoints();
+ if (pattern != null) {
+ context.getCamelContextExtension()
+ .registerEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern));
+ }
+ pattern = isMockEndpointsAndSkip();
+ if (pattern != null) {
+ context.getCamelContextExtension()
+ .registerEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern, true));
+ }
+
+ // configure properties component (mandatory for testing)
+ PropertiesComponent pc = context.getPropertiesComponent();
+ if (extra == null) {
+ extra = useOverridePropertiesWithPropertiesComponent();
+ }
+ if (extra != null && !extra.isEmpty()) {
+ pc.setOverrideProperties(extra);
+ }
+ pc.addPropertiesSource(new PropertiesSource() {
+ @Override
+ public String getName() {
+ return "junit-store";
+ }
+
+ @Override
+ public String getProperty(String name) {
+ return getContextStore().get(name, String.class);
+ }
+ });
+ Boolean ignore = ignoreMissingLocationWithPropertiesComponent();
+ if (ignore != null) {
+ pc.setIgnoreMissingLocation(ignore);
+ }
+
+ String include = getRouteFilterIncludePattern();
+ String exclude = getRouteFilterExcludePattern();
+ if (include != null || exclude != null) {
+ log.info("Route filtering pattern: include={}, exclude={}", include, exclude);
+ context.getCamelContextExtension().getContextPlugin(Model.class).setRouteFilterPattern(include, exclude);
+ }
if (isUseRouteBuilder()) {
- RouteBuilder[] builders = createRouteBuilders();
+ RoutesBuilder[] builders = createRouteBuilders();
// add configuration before routes
- for (RouteBuilder builder : builders) {
+ for (RoutesBuilder builder : builders) {
if (builder instanceof RouteConfigurationsBuilder) {
log.debug("Using created route configuration: {}", builder);
context.addRoutesConfigurations((RouteConfigurationsBuilder) builder);
}
}
- for (RouteBuilder builder : builders) {
- if (!(builder instanceof RouteConfigurationsBuilder)) {
- log.debug("Using created route builder: {}", builder);
- context.addRoutes(builder);
- }
+ for (RoutesBuilder builder : builders) {
+ log.debug("Using created route builder to add routes: {}", builder);
+ context.addRoutes(builder);
+ }
+ for (RoutesBuilder builder : builders) {
+ log.debug("Using created route builder to add templated routes: {}", builder);
+ context.addTemplatedRoutes(builder);
+ }
+ replaceFromEndpoints();
+ boolean skip = "true".equalsIgnoreCase(System.getProperty("skipStartingCamelContext"));
+ if (skip) {
+ log.info("Skipping starting CamelContext as system property skipStartingCamelContext is set to be true.");
+ } else if (isUseAdviceWith()) {
+ log.info("Skipping starting CamelContext as isUseAdviceWith is set to true.");
+ } else {
+ startCamelContext();
}
} else {
- log.debug("isUseRouteBuilder() is false");
+ replaceFromEndpoints();
+ log.debug("Using route builder from the created context: {}", context);
}
+ log.debug("Routing Rules are: {}", context.getRoutes());
- template.start();
- consumer.start();
+ assertValidContext(context);
- // create a default notifier when 1 exchange is done which is the most
- // common case
- oneExchangeDone = event().whenDone(1).create();
+ // prepare for in-between tests
+ postProcessTest();
+ }
- if (isUseRouteBuilder()) {
- startCamelContext();
+ private void replaceFromEndpoints() throws Exception {
+ for (final Map.Entry<String, String> entry : fromEndpoints.entrySet()) {
+ AdviceWith.adviceWith(context.getRouteDefinition(entry.getKey()), context, new AdviceWithRouteBuilder() {
+ @Override
+ public void configure() {
+ replaceFromWith(entry.getValue());
+ }
+ });
}
-
- // reduce default shutdown timeout to avoid waiting for 300 seconds
- context.getShutdownStrategy().setTimeout(10);
}
- @Override
@AfterEach
public void tearDown() throws Exception {
- log.debug("tearDown test: {}", getName());
- if (consumer != null) {
- consumer.stop();
- }
- if (template != null) {
- template.stop();
- }
- stopCamelContext();
+ long time = watch.taken();
- super.tearDown();
+ log.info(SEPARATOR);
+ log.info("Testing done: {} ({})", getCurrentTestName(), getClass().getName());
+ log.info("Took: {} ({} millis)", TimeUtils.printDuration(time, true), time);
+
+ log.info(SEPARATOR);
+
+ log.debug("tearDown()");
+ doStopTemplates(consumer, template, fluentTemplate);
+ doStopCamelContext(context, camelContextService);
+ doPostTearDown();
+ cleanupResources();
+ }
+
+ /**
+ * Strategy to perform any post action, after {@link CamelContext} is stopped
+ */
+ protected void doPostTearDown() throws Exception {
+ // noop
+ }
+
+ /**
+ * Strategy to perform resources setup, before {@link CamelContext} is created
+ */
+ protected void setupResources() throws Exception {
+ }
+
+ /**
+ * Strategy to perform resources cleanup, after {@link CamelContext} is stopped
+ */
+ protected void cleanupResources() throws Exception {
+ // noop
+ }
+
+ /**
+ * Returns the timeout to use when shutting down (unit in seconds).
+ * <p/>
+ * Will default use 10 seconds.
+ *
+ * @return the timeout to use
+ */
+ protected int getShutdownTimeout() {
+ return 10;
}
/**
@@ -170,51 +566,170 @@ public abstract class ContextTestSupport extends TestSupport {
return true;
}
+ /**
+ * Override this method to include and override properties with the Camel {@link PropertiesComponent}.
+ *
+ * @return additional properties to add/override.
+ */
+ protected Properties useOverridePropertiesWithPropertiesComponent() {
+ return null;
+ }
+
+ /**
+ * Whether to ignore missing locations with the {@link PropertiesComponent}. For example when unit testing you may
+ * want to ignore locations that are not available in the environment used for testing.
+ *
+ * @return <tt>true</tt> to ignore, <tt>false</tt> to not ignore, and <tt>null</tt> to leave as configured on the
+ * {@link PropertiesComponent}
+ */
+ protected Boolean ignoreMissingLocationWithPropertiesComponent() {
+ return null;
+ }
+
+ protected void postProcessTest() throws Exception {
+ context = THREAD_CAMEL_CONTEXT.get();
+ template = THREAD_TEMPLATE.get();
+ fluentTemplate = THREAD_FLUENT_TEMPLATE.get();
+ consumer = THREAD_CONSUMER.get();
+ camelContextService = THREAD_SERVICE.get();
+ if (isApplyCamelPostProcessor()) {
+ applyCamelPostProcessor();
+ }
+ }
+
+ /**
+ * Applies the {@link CamelBeanPostProcessor} to this instance.
+ * <p>
+ * Derived classes using IoC / DI frameworks may wish to turn this into a NoOp such as for CDI we would just use CDI
+ * to inject this
+ */
+ protected void applyCamelPostProcessor() throws Exception {
+ // use the bean post processor if the test class is not dependency
+ // injected already by Spring Framework
+ boolean spring = hasClassAnnotation("org.springframework.boot.test.context.SpringBootTest",
+ "org.springframework.context.annotation.ComponentScan");
+ if (!spring) {
+ PluginHelper.getBeanPostProcessor(context).postProcessBeforeInitialization(this,
+ getClass().getName());
+ PluginHelper.getBeanPostProcessor(context).postProcessAfterInitialization(this,
+ getClass().getName());
+ }
+ }
+
+ /**
+ * Does this test class have any of the following annotations on the class-level.
+ */
+ protected boolean hasClassAnnotation(String... names) {
+ for (String name : names) {
+ for (Annotation ann : getClass().getAnnotations()) {
+ String annName = ann.annotationType().getName();
+ if (annName.equals(name)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
protected void stopCamelContext() throws Exception {
+ doStopCamelContext(context, camelContextService);
+ }
+
+ protected void doStopCamelContext(CamelContext context, Service camelContextService) {
if (camelContextService != null) {
+ if (camelContextService == THREAD_SERVICE.get()) {
+ THREAD_SERVICE.remove();
+ }
camelContextService.stop();
} else {
if (context != null) {
+ if (context == THREAD_CAMEL_CONTEXT.get()) {
+ THREAD_CAMEL_CONTEXT.remove();
+ }
context.stop();
}
}
}
+ private static void doStopTemplates(
+ ConsumerTemplate consumer, ProducerTemplate template, FluentProducerTemplate fluentTemplate) {
+ if (consumer != null) {
+ if (consumer == THREAD_CONSUMER.get()) {
+ THREAD_CONSUMER.remove();
+ }
+ consumer.stop();
+ }
+ if (template != null) {
+ if (template == THREAD_TEMPLATE.get()) {
+ THREAD_TEMPLATE.remove();
+ }
+ template.stop();
+ }
+ if (fluentTemplate != null) {
+ if (fluentTemplate == THREAD_FLUENT_TEMPLATE.get()) {
+ THREAD_FLUENT_TEMPLATE.remove();
+ }
+ fluentTemplate.stop();
+ }
+ }
+
protected void startCamelContext() throws Exception {
if (camelContextService != null) {
camelContextService.start();
} else {
- context.start();
+ if (context instanceof DefaultCamelContext) {
+ DefaultCamelContext defaultCamelContext = (DefaultCamelContext) context;
+ if (!defaultCamelContext.isStarted()) {
+ defaultCamelContext.start();
+ }
+ } else {
+ context.start();
+ }
}
}
protected CamelContext createCamelContext() throws Exception {
- CamelContext context = new DefaultCamelContext(createRegistry());
- if (!useJmx()) {
- context.disableJMX();
+ Registry registry = createCamelRegistry();
+
+ CamelContext retContext;
+ if (registry != null) {
+ retContext = new DefaultCamelContext(registry);
+ } else {
+ retContext = new DefaultCamelContext();
}
- context.setLoadTypeConverters(isLoadTypeConverters());
- return context;
- }
- protected Registry createRegistry() throws Exception {
- return new DefaultRegistry();
+ retContext.setLoadTypeConverters(isLoadTypeConverters());
+
+ return retContext;
}
protected Context createJndiContext() throws Exception {
return JndiTest.createInitialContext();
}
- protected List<Processor> getProcessors(String pattern) {
- return context.getRoutes().stream()
- .flatMap(r -> r.filter(pattern).stream()).collect(Collectors.toList());
+ /**
+ * Allows to bind custom beans to the Camel {@link Registry}.
+ */
+ protected void bindToRegistry(Registry registry) throws Exception {
+ // noop
+ }
+
+ /**
+ * Override to use a custom {@link Registry}.
+ * <p>
+ * However if you need to bind beans to the registry then this is possible already with the bind method on registry,
+ * and there is no need to override this method.
+ */
+ protected Registry createCamelRegistry() throws Exception {
+ return new DefaultRegistry();
}
/**
* Factory method which derived classes can use to create a {@link RouteBuilder} to define the routes for testing
*/
- protected RouteBuilder createRouteBuilder() throws Exception {
+ protected RoutesBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
+ @Override
public void configure() {
// no routes added by default
}
@@ -222,13 +737,13 @@ public abstract class ContextTestSupport extends TestSupport {
}
/**
- * Factory method which derived classes can use to create an array of {@link RouteBuilder}s to define the routes for
- * testing
+ * Factory method which derived classes can use to create an array of {@link org.apache.camel.builder.RouteBuilder}s
+ * to define the routes for testing
*
* @see #createRouteBuilder()
*/
- protected RouteBuilder[] createRouteBuilders() throws Exception {
- return new RouteBuilder[] { createRouteBuilder() };
+ protected RoutesBuilder[] createRouteBuilders() throws Exception {
+ return new RoutesBuilder[] { createRouteBuilder() };
}
/**
@@ -238,7 +753,7 @@ public abstract class ContextTestSupport extends TestSupport {
* @return the endpoint
*/
protected Endpoint resolveMandatoryEndpoint(String uri) {
- return resolveMandatoryEndpoint(context, uri);
+ return TestSupport.resolveMandatoryEndpoint(context, uri);
}
/**
@@ -248,7 +763,7 @@ public abstract class ContextTestSupport extends TestSupport {
* @return the endpoint
*/
protected <T extends Endpoint> T resolveMandatoryEndpoint(String uri, Class<T> endpointType) {
- return resolveMandatoryEndpoint(context, uri, endpointType);
+ return TestSupport.resolveMandatoryEndpoint(context, uri, endpointType);
}
/**
@@ -258,7 +773,55 @@ public abstract class ContextTestSupport extends TestSupport {
* @return the mandatory mock endpoint or an exception is thrown if it could not be resolved
*/
protected MockEndpoint getMockEndpoint(String uri) {
- return resolveMandatoryEndpoint(uri, MockEndpoint.class);
+ return getMockEndpoint(uri, true);
+ }
+
+ /**
+ * Resolves the {@link MockEndpoint} using a URI of the form <code>mock:someName</code>, optionally creating it if
+ * it does not exist. This implementation will lookup existing mock endpoints and match on the mock queue name, eg
+ * mock:foo and mock:foo?retainFirst=5 would match as the queue name is foo.
+ *
+ * @param uri the URI which typically starts with "mock:" and has some name
+ * @param create whether or not to allow the endpoint to be created if it doesn't exist
+ * @return the mock endpoint or an {@link NoSuchEndpointException} is thrown if it could not
+ * be resolved
+ * @throws NoSuchEndpointException is the mock endpoint does not exist
+ */
+ protected MockEndpoint getMockEndpoint(String uri, boolean create) throws NoSuchEndpointException {
+ // look for existing mock endpoints that have the same queue name, and
+ // to
+ // do that we need to normalize uri and strip out query parameters and
+ // whatnot
+ String n;
+ try {
+ n = URISupport.normalizeUri(uri);
+ } catch (URISyntaxException e) {
+ throw RuntimeCamelException.wrapRuntimeException(e);
+ }
+ // strip query
+ final String target = StringHelper.before(n, "?", n);
+
+ // lookup endpoints in registry and try to find it
+ MockEndpoint found = (MockEndpoint) context.getEndpointRegistry().values().stream()
+ .filter(e -> e instanceof MockEndpoint).filter(e -> {
+ String t = e.getEndpointUri();
+ // strip query
+ int idx2 = t.indexOf('?');
+ if (idx2 != -1) {
+ t = t.substring(0, idx2);
+ }
+ return t.equals(target);
+ }).findFirst().orElse(null);
+
+ if (found != null) {
+ return found;
+ }
+
+ if (create) {
+ return resolveMandatoryEndpoint(uri, MockEndpoint.class);
+ } else {
+ throw new NoSuchEndpointException(String.format("MockEndpoint %s does not exist.", uri));
+ }
}
/**
@@ -268,12 +831,9 @@ public abstract class ContextTestSupport extends TestSupport {
* @param body the body for the message
*/
protected void sendBody(String endpointUri, final Object body) {
- template.send(endpointUri, new Processor() {
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- in.setBody(body);
- in.setHeader("testCase", getName());
- }
+ template.send(endpointUri, exchange -> {
+ Message in = exchange.getIn();
+ in.setBody(body);
});
}
@@ -285,14 +845,11 @@ public abstract class ContextTestSupport extends TestSupport {
* @param headers any headers to set on the message
*/
protected void sendBody(String endpointUri, final Object body, final Map<String, Object> headers) {
- template.send(endpointUri, new Processor() {
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- in.setBody(body);
- in.setHeader("testCase", getName());
- for (Map.Entry<String, Object> entry : headers.entrySet()) {
- in.setHeader(entry.getKey(), entry.getValue());
- }
+ template.send(endpointUri, exchange -> {
+ Message in = exchange.getIn();
+ in.setBody(body);
+ for (Map.Entry<String, Object> entry : headers.entrySet()) {
+ in.setHeader(entry.getKey(), entry.getValue());
}
});
}
@@ -316,6 +873,30 @@ public abstract class ContextTestSupport extends TestSupport {
return createExchangeWithBody(context, body);
}
+ /**
+ * Reset all Mock endpoints.
+ */
+ protected void resetMocks() {
+ MockEndpoint.resetMocks(context);
+ }
+
+ /**
+ * Asserts that all the expectations of the Mock endpoints are valid
+ */
+ protected void assertMockEndpointsSatisfied() throws InterruptedException {
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ /**
+ * Asserts that all the expectations of the Mock endpoints are valid
+ *
+ * @param timeout timeout
+ * @param unit time unit
+ */
+ protected void assertMockEndpointsSatisfied(long timeout, TimeUnit unit) throws InterruptedException {
+ MockEndpoint.assertIsSatisfied(context, timeout, unit);
+ }
+
/**
* Asserts that the given language name and expression evaluates to the given value on a specific exchange
*/
@@ -325,7 +906,7 @@ public abstract class ContextTestSupport extends TestSupport {
Expression expression = language.createExpression(expressionText);
assertNotNull(expression, "No Expression could be created for text: " + expressionText + " language: " + language);
- assertExpression(expression, exchange, expectedValue);
+ TestSupport.assertExpression(expression, exchange, expectedValue);
}
/**
@@ -338,7 +919,7 @@ public abstract class ContextTestSupport extends TestSupport {
Predicate predicate = language.createPredicate(expressionText);
assertNotNull(predicate, "No Predicate could be created for text: " + expressionText + " language: " + language);
- assertPredicate(predicate, exchange, expected);
+ TestSupport.assertPredicate(predicate, exchange, expected);
}
/**
@@ -350,41 +931,74 @@ public abstract class ContextTestSupport extends TestSupport {
return language;
}
+ protected void assertValidContext(CamelContext context) {
+ assertNotNull(context, "No context found!");
+ }
+
+ protected <T extends Endpoint> T getMandatoryEndpoint(String uri, Class<T> type) {
+ T endpoint = context.getEndpoint(uri, type);
+ assertNotNull(endpoint, "No endpoint found for uri: " + uri);
+ return endpoint;
+ }
+
+ protected Endpoint getMandatoryEndpoint(String uri) {
+ Endpoint endpoint = context.getEndpoint(uri);
+ assertNotNull(endpoint, "No endpoint found for uri: " + uri);
+ return endpoint;
+ }
+
/**
- * Asserts that all the expectations of the Mock endpoints are valid
+ * Disables the JMX agent. Must be called before the {@link #setUp()} method.
*/
- protected void assertMockEndpointsSatisfied() throws InterruptedException {
- MockEndpoint.assertIsSatisfied(context);
+ protected void disableJMX() {
+ DefaultCamelContext.setDisableJmx(true);
}
/**
- * Sets the assert period on all the Mock endpoints
+ * Enables the JMX agent. Must be called before the {@link #setUp()} method.
*/
- protected void setAssertPeriod(long period) {
- MockEndpoint.setAssertPeriod(context, period);
+ protected void enableJMX() {
+ DefaultCamelContext.setDisableJmx(false);
}
/**
- * Reset all Mock endpoints.
+ * Single step debugs and Camel invokes this method before entering the given processor
*/
- protected void resetMocks() {
- MockEndpoint.resetMocks(context);
+ protected void debugBefore(
+ Exchange exchange, Processor processor, ProcessorDefinition<?> definition, String id, String label) {
}
- protected void assertValidContext(CamelContext context) {
- assertNotNull(context, "No context found!");
+ /**
+ * Single step debugs and Camel invokes this method after processing the given processor
+ */
+ protected void debugAfter(
+ Exchange exchange, Processor processor, ProcessorDefinition<?> definition, String id, String label,
+ long timeTaken) {
}
- protected <T extends Endpoint> T getMandatoryEndpoint(String uri, Class<T> type) {
- T endpoint = context.getEndpoint(uri, type);
- assertNotNull(endpoint, "No endpoint found for uri: " + uri);
- return endpoint;
+ /**
+ * To easily debug by overriding the <tt>debugBefore</tt> and <tt>debugAfter</tt> methods.
+ */
+ private class DebugBreakpoint extends BreakpointSupport {
+
+ @Override
+ public void beforeProcess(Exchange exchange, Processor processor, NamedNode definition) {
+ debugBefore(exchange, processor, (ProcessorDefinition<?>) definition, definition.getId(),
+ definition.getLabel());
+ }
+
+ @Override
+ public void afterProcess(Exchange exchange, Processor processor, NamedNode definition, long timeTaken) {
+ debugAfter(exchange, processor, (ProcessorDefinition<?>) definition, definition.getId(),
+ definition.getLabel(), timeTaken);
+ }
}
- protected Endpoint getMandatoryEndpoint(String uri) {
- Endpoint endpoint = context.getEndpoint(uri);
- assertNotNull(endpoint, "No endpoint found for uri: " + uri);
- return endpoint;
+ /**
+ * Convenient api to create a NotifyBuilder to be notified of a specific event
+ */
+ protected NotifyBuilder event() {
+ return new NotifyBuilder(context);
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/TestSupport.java b/core/camel-core/src/test/java/org/apache/camel/TestSupport.java
index d7c347824c9..c32844cb96c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/TestSupport.java
+++ b/core/camel-core/src/test/java/org/apache/camel/TestSupport.java
@@ -33,6 +33,8 @@ import org.apache.camel.component.seda.SedaComponent;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.processor.Pipeline;
import org.apache.camel.processor.errorhandler.ErrorHandlerSupport;
+import org.apache.camel.spi.Debugger;
+import org.apache.camel.spi.FactoryFinder;
import org.apache.camel.support.DefaultExchange;
import org.apache.camel.support.PredicateAssertHelper;
import org.hamcrest.Matcher;
@@ -143,6 +145,19 @@ public abstract class TestSupport {
return resolvedPath;
}
+ /**
+ * Indicates whether the component {@code camel-debug} is present in the classpath of the test.
+ *
+ * @return {@code true} if it is present, {@code false} otherwise.
+ */
+ public static boolean isCamelDebugPresent() {
+ // Needs to be detected before initializing and starting the camel context
+ return Thread.currentThread()
+ .getContextClassLoader()
+ .getResource(String.format("%s%s", FactoryFinder.DEFAULT_PATH, Debugger.FACTORY))
+ != null;
+ }
+
protected String fileUri() {
return "file:" + tempDirectory;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java
index d7188e38c6d..4233734838a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/NotifyBuilderFromRouteTest.java
@@ -32,6 +32,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class NotifyBuilderFromRouteTest extends ContextTestSupport {
+ @Override
+ protected Registry createCamelRegistry() throws Exception {
+ final Registry registry = super.createCamelRegistry();
+ registry.bind("proxy", new ProxyComponent());
+ return registry;
+ }
+
@Test
public void testDoneFromRoute() throws Exception {
// notify when exchange is done
@@ -65,13 +72,6 @@ public class NotifyBuilderFromRouteTest extends ContextTestSupport {
assertTrue(builder.matchesWaitTime());
}
- @Override
- protected Registry createRegistry() throws Exception {
- final Registry registry = super.createRegistry();
- registry.bind("proxy", new ProxyComponent());
- return registry;
- }
-
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/ThreadPoolBuilderTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/ThreadPoolBuilderTest.java
index 78115451d7a..c8cbc5c6467 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/ThreadPoolBuilderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/ThreadPoolBuilderTest.java
@@ -33,8 +33,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class ThreadPoolBuilderTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
ExecutorService someone = Executors.newCachedThreadPool();
jndi.bind("someonesPool", someone);
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanChoseMethodWithMatchingTypeAndSkipSettersTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanChoseMethodWithMatchingTypeAndSkipSettersTest.java
index da90d0daa40..00815f258c2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanChoseMethodWithMatchingTypeAndSkipSettersTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanChoseMethodWithMatchingTypeAndSkipSettersTest.java
@@ -28,8 +28,8 @@ public class BeanChoseMethodWithMatchingTypeAndSkipSettersTest extends ContextTe
private OrderServiceBean service = new OrderServiceBean();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("orderService", service);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentMissingParenthesisTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentMissingParenthesisTest.java
index dbafe6e1465..5ebb3b75f6a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentMissingParenthesisTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentMissingParenthesisTest.java
@@ -28,8 +28,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
public class BeanComponentMissingParenthesisTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyContactBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentWithPropertiesLookupSetFromEndpointTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentWithPropertiesLookupSetFromEndpointTest.java
index 486028345bb..6d697bbcffc 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentWithPropertiesLookupSetFromEndpointTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentWithPropertiesLookupSetFromEndpointTest.java
@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
public class BeanComponentWithPropertiesLookupSetFromEndpointTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", "Hi");
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java
index 9f93d391f6d..185829bd906 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanConcurrentTest.java
@@ -62,8 +62,8 @@ public class BeanConcurrentTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanEndpointTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanEndpointTest.java
index f84ac72ee06..f881e82608b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanEndpointTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanEndpointTest.java
@@ -33,8 +33,8 @@ public class BeanEndpointTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new FooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExchangeAsReturnTypeNotAllowedTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExchangeAsReturnTypeNotAllowedTest.java
index eb970ae13ff..d636d3fa747 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExchangeAsReturnTypeNotAllowedTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExchangeAsReturnTypeNotAllowedTest.java
@@ -45,8 +45,8 @@ public class BeanExchangeAsReturnTypeNotAllowedTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodAmbiguousTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodAmbiguousTest.java
index 7f18c9760d4..0cee490106f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodAmbiguousTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodAmbiguousTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.fail;
public class BeanExplicitMethodAmbiguousTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy", new MyDummyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodTest.java
index 9c7069a981d..31e9b3ca0bf 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExplicitMethodTest.java
@@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test;
public class BeanExplicitMethodTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyOtherFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExpressionConcurrentTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExpressionConcurrentTest.java
index cd6518af012..6d8f52f9918 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExpressionConcurrentTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanExpressionConcurrentTest.java
@@ -62,8 +62,8 @@ public class BeanExpressionConcurrentTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanImplicitMethodTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanImplicitMethodTest.java
index f99e331859e..066df80662b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanImplicitMethodTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanImplicitMethodTest.java
@@ -47,8 +47,8 @@ public class BeanImplicitMethodTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInPipelineTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInPipelineTest.java
index 8ccd41340f6..3f5290e33d3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInPipelineTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInPipelineTest.java
@@ -35,8 +35,8 @@ public class BeanInPipelineTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("one", new MyBean("one"));
answer.bind("two", new MyBean("two"));
answer.bind("three", new MyBean("three"));
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoSelectMethodTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoSelectMethodTest.java
index 739cb49b354..b4caf5a3baf 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoSelectMethodTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInfoSelectMethodTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.fail;
public class BeanInfoSelectMethodTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvokeWithNullBodyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvokeWithNullBodyTest.java
index e32bd0862f3..75b315b8615 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvokeWithNullBodyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvokeWithNullBodyTest.java
@@ -52,8 +52,8 @@ public class BeanInvokeWithNullBodyTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyNullFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanLifecycleTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanLifecycleTest.java
index 5d03047b33a..8ec72cd7e8e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanLifecycleTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanLifecycleTest.java
@@ -74,8 +74,8 @@ public class BeanLifecycleTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("statefulInstanceInRegistry", statefulInstanceInRegistry);
jndi.bind("statefulInstanceInRegistryNoCache", statefulInstanceInRegistryNoCache);
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMapPutTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMapPutTest.java
index f894e89e4b0..abf6aaddc1f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMapPutTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMapPutTest.java
@@ -31,8 +31,8 @@ public class BeanMapPutTest extends ContextTestSupport {
private Map<String, String> myMap = new HashMap<>();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myMap", myMap);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodValueWithCommaTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodValueWithCommaTest.java
index a838f89cb38..a9120e1d829 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodValueWithCommaTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodValueWithCommaTest.java
@@ -63,8 +63,8 @@ public class BeanMethodValueWithCommaTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodValueWithExchangeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodValueWithExchangeTest.java
index 061699b3141..a7757c9bec1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodValueWithExchangeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodValueWithExchangeTest.java
@@ -46,8 +46,8 @@ public class BeanMethodValueWithExchangeTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithEmptyParameterAndNoMethodWithNoParameterIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithEmptyParameterAndNoMethodWithNoParameterIssueTest.java
index 3fffe46a5df..335fe999f5b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithEmptyParameterAndNoMethodWithNoParameterIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithEmptyParameterAndNoMethodWithNoParameterIssueTest.java
@@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
public class BeanMethodWithEmptyParameterAndNoMethodWithNoParameterIssueTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyBean());
jndi.bind("myOtherBean", new MyOtherBean());
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithStringParameterTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithStringParameterTest.java
index 9324fbb3bb3..a92e98bdfe0 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithStringParameterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithStringParameterTest.java
@@ -28,8 +28,8 @@ import org.junit.jupiter.api.Test;
public class BeanMethodWithStringParameterTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanOgnlPerformanceTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanOgnlPerformanceTest.java
index 5333a859aae..1af6b9e1c39 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanOgnlPerformanceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanOgnlPerformanceTest.java
@@ -32,8 +32,8 @@ public class BeanOgnlPerformanceTest extends ContextTestSupport {
private String scope = "Singleton";
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidSyntaxTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidSyntaxTest.java
index 6e91fd56698..5cc2dbf17b2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidSyntaxTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidSyntaxTest.java
@@ -42,8 +42,8 @@ public class BeanParameterInvalidSyntaxTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidValueTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidValueTest.java
index 2a09d1348f3..4b3018bfdbc 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidValueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidValueTest.java
@@ -92,8 +92,8 @@ public class BeanParameterInvalidValueTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterMethodCallThreeBodyOgnlTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterMethodCallThreeBodyOgnlTest.java
index e09b1e9599f..38deff26ab4 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterMethodCallThreeBodyOgnlTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterMethodCallThreeBodyOgnlTest.java
@@ -45,8 +45,8 @@ public class BeanParameterMethodCallThreeBodyOgnlTest extends ContextTestSupport
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("router", new MyRouter());
jndi.bind("foo", new MyBean());
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterNoBeanBindingTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterNoBeanBindingTest.java
index 23ff417286a..a053af8d26a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterNoBeanBindingTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterNoBeanBindingTest.java
@@ -48,8 +48,8 @@ public class BeanParameterNoBeanBindingTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterThreeBodyOgnlTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterThreeBodyOgnlTest.java
index 66d56057835..cf37aec9afa 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterThreeBodyOgnlTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterThreeBodyOgnlTest.java
@@ -45,8 +45,8 @@ public class BeanParameterThreeBodyOgnlTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOgnlTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOgnlTest.java
index d54a63a24e1..7f263d6728a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOgnlTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOgnlTest.java
@@ -59,8 +59,8 @@ public class BeanParameterValueOgnlTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOverloadedTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOverloadedTest.java
index e56de1af3cc..143c80cae48 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOverloadedTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueOverloadedTest.java
@@ -45,8 +45,8 @@ public class BeanParameterValueOverloadedTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueTest.java
index 69d257064b7..46b67d70423 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueTest.java
@@ -107,8 +107,8 @@ public class BeanParameterValueTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineTest.java
index f800615eb08..92c749a3766 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineTest.java
@@ -55,8 +55,8 @@ public class BeanPipelineTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", new FooBean());
answer.bind("bar", new BarBean());
answer.bind("baz", new BazBean());
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineVariablesTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineVariablesTest.java
index 02355fd2da8..f93aea45b9c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineVariablesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPipelineVariablesTest.java
@@ -55,8 +55,8 @@ public class BeanPipelineVariablesTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", new FooBean());
answer.bind("bar", new BarBean());
answer.bind("baz", new BazBean());
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPropagateHeaderTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPropagateHeaderTest.java
index 3af3c61fc4f..7957ad96005 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPropagateHeaderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPropagateHeaderTest.java
@@ -40,8 +40,8 @@ public class BeanPropagateHeaderTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("order", new MyOrderService());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPropertiesFunctionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPropertiesFunctionTest.java
index b9e4fc6e6f2..eb26ebef5e7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPropertiesFunctionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanPropertiesFunctionTest.java
@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
public class BeanPropertiesFunctionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("fooBean", new BeanPropertiesFunctionTest.FooBean());
registry.bind("barBean", new BeanPropertiesFunctionTest.BarBean());
return registry;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefMethodNotFoundTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefMethodNotFoundTest.java
index 1525c738ca2..fcb5bd7c195 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefMethodNotFoundTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefMethodNotFoundTest.java
@@ -28,8 +28,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
public class BeanRefMethodNotFoundTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefNotFoundTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefNotFoundTest.java
index 441514de224..9263ab8047c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefNotFoundTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanRefNotFoundTest.java
@@ -29,8 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
public class BeanRefNotFoundTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableReturnNullTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableReturnNullTest.java
index 2970eec67d8..65d9ed7b89c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableReturnNullTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableReturnNullTest.java
@@ -40,8 +40,8 @@ public class BeanReturnCallableReturnNullTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableTest.java
index 5239f4901b0..ae05a0e50e0 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanReturnCallableTest.java
@@ -38,8 +38,8 @@ public class BeanReturnCallableTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationAndExchangeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationAndExchangeTest.java
index eb941f12b5b..8b9f62f07b4 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationAndExchangeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationAndExchangeTest.java
@@ -44,8 +44,8 @@ public class BeanWithAnnotationAndExchangeTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationInheritedTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationInheritedTest.java
index dba9fb20762..4a6a56cfd3e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationInheritedTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationInheritedTest.java
@@ -73,8 +73,8 @@ public class BeanWithAnnotationInheritedTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("b", new B());
answer.bind("p", Proxy.newProxyInstance(I1.class.getClassLoader(), new Class[] { I1.class }, new InvocationHandler() {
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExchangeExceptionAnnotationTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExchangeExceptionAnnotationTest.java
index d5109381271..d1e20219da3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExchangeExceptionAnnotationTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExchangeExceptionAnnotationTest.java
@@ -44,8 +44,8 @@ public class BeanWithExchangeExceptionAnnotationTest extends ContextTestSupport
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionPredicateTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionPredicateTest.java
index 8e7b64f02b8..96cd8709bc6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionPredicateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionPredicateTest.java
@@ -46,8 +46,8 @@ public class BeanWithExpressionInjectionPredicateTest extends ContextTestSupport
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java
index 53c52e0ac55..b91231eed1b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java
@@ -42,8 +42,8 @@ public class BeanWithExpressionInjectionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeaderTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeaderTest.java
index 7554949aa07..6646ae57f06 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeaderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeaderTest.java
@@ -41,8 +41,8 @@ public class BeanWithHeaderTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject2Test.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject2Test.java
index 87d4ede2e0e..d86c9acc070 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject2Test.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject2Test.java
@@ -95,8 +95,8 @@ public class BeanWithHeadersAndBodyInject2Test extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject3Test.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject3Test.java
index 34382456304..1e6af458291 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject3Test.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInject3Test.java
@@ -71,8 +71,8 @@ public class BeanWithHeadersAndBodyInject3Test extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java
index 3a541eec935..7275f62c92f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java
@@ -60,8 +60,8 @@ public class BeanWithHeadersAndBodyInjectionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithInputStreamBodyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithInputStreamBodyTest.java
index 6b5dbedb28d..3c107f73efa 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithInputStreamBodyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithInputStreamBodyTest.java
@@ -28,8 +28,8 @@ import org.junit.jupiter.api.Test;
public class BeanWithInputStreamBodyTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyCoolBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithMethodHeaderTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithMethodHeaderTest.java
index 4de95f27e4f..d0ceb188fa1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithMethodHeaderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithMethodHeaderTest.java
@@ -134,8 +134,8 @@ public class BeanWithMethodHeaderTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
bean = new MyBean();
answer.bind("myBean", bean);
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersAndBodyInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersAndBodyInjectionTest.java
index ba2bc5d939c..c2b3dd81327 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersAndBodyInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersAndBodyInjectionTest.java
@@ -66,8 +66,8 @@ public class BeanWithPropertiesAndHeadersAndBodyInjectionTest extends ContextTes
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java
index 1560728a5dc..7e407979824 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java
@@ -64,8 +64,8 @@ public class BeanWithPropertiesAndHeadersInjectionTest extends ContextTestSuppor
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndVariablesInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndVariablesInjectionTest.java
index b627ce63ead..216c1fe3d17 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndVariablesInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndVariablesInjectionTest.java
@@ -64,8 +64,8 @@ public class BeanWithPropertiesAndVariablesInjectionTest extends ContextTestSupp
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithVariablesAndBodyInject3Test.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithVariablesAndBodyInject3Test.java
index 795f0ca46bd..8245be4b409 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithVariablesAndBodyInject3Test.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithVariablesAndBodyInject3Test.java
@@ -71,8 +71,8 @@ public class BeanWithVariablesAndBodyInject3Test extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithVariablesAndBodyInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithVariablesAndBodyInjectionTest.java
index e1245c0cdeb..4b42eb2f1d6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithVariablesAndBodyInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithVariablesAndBodyInjectionTest.java
@@ -62,8 +62,8 @@ public class BeanWithVariablesAndBodyInjectionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingHeaderValueTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingHeaderValueTest.java
index b2c131c2fce..7633337187b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingHeaderValueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingHeaderValueTest.java
@@ -49,8 +49,8 @@ public class BeanWithXPathInjectionUsingHeaderValueTest extends ContextTestSuppo
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingResultTypeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingResultTypeTest.java
index 50432b6b086..3b2d383431a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingResultTypeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithXPathInjectionUsingResultTypeTest.java
@@ -35,8 +35,8 @@ public class BeanWithXPathInjectionUsingResultTypeTest extends ContextTestSuppor
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java
index 942bd8237ea..499b60db7f5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java
@@ -42,8 +42,8 @@ public class BodyAnnotationToDisambiguateMethodsTest extends ContextTestSupport
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/ClassComponentWithPropertiesLookupSetFromEndpointTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/ClassComponentWithPropertiesLookupSetFromEndpointTest.java
index 61c9c0deb63..974890b8f87 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/ClassComponentWithPropertiesLookupSetFromEndpointTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/ClassComponentWithPropertiesLookupSetFromEndpointTest.java
@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
public class ClassComponentWithPropertiesLookupSetFromEndpointTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", "Hi");
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/CustomParameterMappingStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/CustomParameterMappingStrategyTest.java
index e0235318454..45c1e8e58e2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/CustomParameterMappingStrategyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/CustomParameterMappingStrategyTest.java
@@ -27,8 +27,8 @@ import org.junit.jupiter.api.Test;
public class CustomParameterMappingStrategyTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
jndi.bind("myStrategy", new MyCustomStrategy());
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/DefaultParameterMappingStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/DefaultParameterMappingStrategyTest.java
index 4618c188121..48d58bffc68 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/DefaultParameterMappingStrategyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/DefaultParameterMappingStrategyTest.java
@@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class DefaultParameterMappingStrategyTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java
index 40ca06cca72..abafbb9e1b4 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java
@@ -49,8 +49,8 @@ public class ExpressionAnnotationToDisambiguateMethodsTest extends ContextTestSu
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
answer.bind("myOtherBean", myOtherBean);
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/FileBeanParameterBindingTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/FileBeanParameterBindingTest.java
index 0a8d6e7218d..fc7ad86d8e2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/FileBeanParameterBindingTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/FileBeanParameterBindingTest.java
@@ -31,8 +31,8 @@ import static org.junit.jupiter.api.Assertions.assertNull;
public class FileBeanParameterBindingTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallBeanRefMethodNotFoundTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallBeanRefMethodNotFoundTest.java
index 8255261111e..23d452d969d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallBeanRefMethodNotFoundTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallBeanRefMethodNotFoundTest.java
@@ -28,8 +28,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
public class MethodCallBeanRefMethodNotFoundTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallBeanRefNotFoundTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallBeanRefNotFoundTest.java
index 0f9d4ff07c5..fce75980cc5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallBeanRefNotFoundTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallBeanRefNotFoundTest.java
@@ -29,8 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
public class MethodCallBeanRefNotFoundTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallByTypeRefExistingBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallByTypeRefExistingBeanTest.java
index 715da5209e6..c146b111b68 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallByTypeRefExistingBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallByTypeRefExistingBeanTest.java
@@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test;
public class MethodCallByTypeRefExistingBeanTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean("Type Ref "));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallRefOrBeanPrefixPredicateTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallRefOrBeanPrefixPredicateTest.java
index 755e5bcfb89..f384c7d2e5d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallRefOrBeanPrefixPredicateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallRefOrBeanPrefixPredicateTest.java
@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
public class MethodCallRefOrBeanPrefixPredicateTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallRefOrBeanPrefixTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallRefOrBeanPrefixTest.java
index b87b3e2cab6..5880d71b2c7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallRefOrBeanPrefixTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MethodCallRefOrBeanPrefixTest.java
@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
public class MethodCallRefOrBeanPrefixTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoMockForClassTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoMockForClassTest.java
index 0c109ca399f..4766d0aa2a3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoMockForClassTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoMockForClassTest.java
@@ -35,11 +35,11 @@ public class MockitoMockForClassTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
MyService mockService = Mockito.mock(MyService.class);
when(mockService.doSomething(any())).thenReturn("mocked answer");
- Registry answer = super.createRegistry();
+ Registry answer = super.createCamelRegistry();
answer.bind("myService", mockService);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoMockForInterfaceTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoMockForInterfaceTest.java
index 464774c61a2..9d154cb9714 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoMockForInterfaceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoMockForInterfaceTest.java
@@ -35,11 +35,11 @@ public class MockitoMockForInterfaceTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
MyService mockService = Mockito.mock(MyService.class);
when(mockService.doSomething(any())).thenReturn("mocked answer");
- Registry answer = super.createRegistry();
+ Registry answer = super.createCamelRegistry();
answer.bind("myService", mockService);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoSpyForClassTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoSpyForClassTest.java
index 66ae8981290..5c8d0008a00 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoSpyForClassTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MockitoSpyForClassTest.java
@@ -35,11 +35,11 @@ public class MockitoSpyForClassTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
MyService mockService = Mockito.spy(new MyService());
when(mockService.doSomething(any())).thenReturn("mocked answer");
- Registry answer = super.createRegistry();
+ Registry answer = super.createCamelRegistry();
answer.bind("myService", mockService);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/MyCurrencyBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/MyCurrencyBeanTest.java
index 978c3868708..3aa81d6f103 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/MyCurrencyBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/MyCurrencyBeanTest.java
@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
public class MyCurrencyBeanTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myCurrencyBean", new MyCurrencyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java
index 20030cb1873..90a6cc3650d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/NewInstanceTest.java
@@ -52,7 +52,7 @@ public class NewInstanceTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
jndiContext = new JndiContext();
jndiContext.bind("myBean", new MyBean());
return new DefaultRegistry(new JndiBeanRepository(jndiContext));
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/PredicateAsBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/PredicateAsBeanTest.java
index 70ed9c38fbe..e4d7b1dd076 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/PredicateAsBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/PredicateAsBeanTest.java
@@ -42,8 +42,8 @@ public class PredicateAsBeanTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myPredicate", myPredicate);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionMethodValueWithCommaTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionMethodValueWithCommaTest.java
index 7fe20c02a43..cb138a88f8b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionMethodValueWithCommaTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionMethodValueWithCommaTest.java
@@ -67,8 +67,8 @@ public class SimpleLanguageBeanFunctionMethodValueWithCommaTest extends ContextT
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionMethodValueWithParenthesisTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionMethodValueWithParenthesisTest.java
index fd5d5e26013..f2e3feced77 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionMethodValueWithParenthesisTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionMethodValueWithParenthesisTest.java
@@ -67,8 +67,8 @@ public class SimpleLanguageBeanFunctionMethodValueWithParenthesisTest extends Co
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionScopeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionScopeTest.java
index 0583db9d745..ecf1a8d3648 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionScopeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/SimpleLanguageBeanFunctionScopeTest.java
@@ -60,7 +60,7 @@ public class SimpleLanguageBeanFunctionScopeTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
Registry wrapper = new SimpleRegistry() {
@Override
public Object lookupByName(String name) {
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanRouteToDerivedClassTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanRouteToDerivedClassTest.java
index af99c6d7bd1..814353a252a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanRouteToDerivedClassTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanRouteToDerivedClassTest.java
@@ -108,8 +108,8 @@ public class BeanRouteToDerivedClassTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("derived", derived);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanVsProcessorPerformanceTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanVsProcessorPerformanceTest.java
index 9a0f74311ff..68ffcc6900f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanVsProcessorPerformanceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/BeanVsProcessorPerformanceTest.java
@@ -32,8 +32,8 @@ public class BeanVsProcessorPerformanceTest extends ContextTestSupport {
private final int size = 100000;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myLittleBean", new MyLittleBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanRegistryTest.java b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanRegistryTest.java
index 3b6730297c9..ef28e05a810 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanRegistryTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanRegistryTest.java
@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
public class FilterBeanRegistryTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/BigDataSetManualTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/BigDataSetManualTest.java
index 7a4146930c0..6bdc407f62a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/BigDataSetManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/BigDataSetManualTest.java
@@ -37,8 +37,8 @@ public class BigDataSetManualTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java
index 54a3218f5f7..525a7d499cd 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java
@@ -48,8 +48,8 @@ public class CustomDataSetTest extends ContextTestSupport {
};
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetConsumerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetConsumerTest.java
index 97da3b68dbc..358b73fc7b6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetConsumerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetConsumerTest.java
@@ -37,8 +37,8 @@ public class DataSetConsumerTest extends ContextTestSupport {
final String resultUri = "mock://result";
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetPreloadTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetPreloadTest.java
index 4d35452ad1a..c3bbaeb08d1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetPreloadTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetPreloadTest.java
@@ -31,8 +31,8 @@ public class DataSetPreloadTest extends ContextTestSupport {
private String uri = "dataset:foo?initialDelay=0&preloadSize=5";
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetProducerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetProducerTest.java
index dac5c2cabb2..813b39afede 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetProducerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetProducerTest.java
@@ -38,8 +38,8 @@ public class DataSetProducerTest extends ContextTestSupport {
final String resultUri = "mock://result";
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetSedaTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetSedaTest.java
index e8919a3afa0..b29674db550 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetSedaTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetSedaTest.java
@@ -32,8 +32,8 @@ public class DataSetSedaTest extends ContextTestSupport {
private String uri = "dataset:foo?initialDelay=0&produceDelay=1";
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetTest.java
index b8e3649bf9c..2fae450d51a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetTest.java
@@ -26,8 +26,8 @@ public class DataSetTest extends ContextTestSupport {
protected SimpleDataSet dataSet = new SimpleDataSet(20);
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetConsumerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetConsumerTest.java
index ff948dfd65d..f2caeb82d02 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetConsumerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetConsumerTest.java
@@ -36,8 +36,8 @@ public class FileDataSetConsumerTest extends ContextTestSupport {
final String dataSetUri = "dataset://" + dataSetName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetConsumerWithSplitTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetConsumerWithSplitTest.java
index 1910c020f97..cf38fdbd4e7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetConsumerWithSplitTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetConsumerWithSplitTest.java
@@ -38,8 +38,8 @@ public class FileDataSetConsumerWithSplitTest extends ContextTestSupport {
final String dataSetUri = "dataset://" + dataSetName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerTest.java
index 424e1ae94d7..1813cea392a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerTest.java
@@ -47,8 +47,8 @@ public class FileDataSetProducerTest extends ContextTestSupport {
final String dataSetUri = "dataset://" + dataSetName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerWithSplitTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerWithSplitTest.java
index fd5129cb7cf..578475b3cc9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerWithSplitTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerWithSplitTest.java
@@ -47,8 +47,8 @@ public class FileDataSetProducerWithSplitTest extends ContextTestSupport {
final String dataSetUri = "dataset://" + dataSetName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/ListDataSetConsumerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/ListDataSetConsumerTest.java
index ac0ac395cf1..d9cada0e54c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/ListDataSetConsumerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/ListDataSetConsumerTest.java
@@ -36,8 +36,8 @@ public class ListDataSetConsumerTest extends ContextTestSupport {
final String dataSetUri = "dataset://" + dataSetName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/ListDataSetProducerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/ListDataSetProducerTest.java
index 850cbe42dac..afb19d30d08 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/ListDataSetProducerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/ListDataSetProducerTest.java
@@ -35,8 +35,8 @@ public class ListDataSetProducerTest extends ContextTestSupport {
final String dataSetUri = "dataset://" + dataSetName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/dataset/RoutePerformanceTest.java b/core/camel-core/src/test/java/org/apache/camel/component/dataset/RoutePerformanceTest.java
index 24922cd2348..c872977ee39 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/dataset/RoutePerformanceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/dataset/RoutePerformanceTest.java
@@ -40,8 +40,8 @@ public class RoutePerformanceTest extends ContextTestSupport {
private String uri = "mock:results";
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", dataSet);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
index 8044f9863f5..1d8f4a60ab2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
@@ -36,11 +36,11 @@ public class AntPathMatcherGenericFileFilterTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
AntPathMatcherGenericFileFilter<File> filterNotCaseSensitive = new AntPathMatcherGenericFileFilter<>("**/c*");
filterNotCaseSensitive.setCaseSensitive(false);
- Registry jndi = super.createRegistry();
+ Registry jndi = super.createCamelRegistry();
jndi.bind("filter", new AntPathMatcherGenericFileFilter<File>("**/c*"));
jndi.bind("caseInsensitiveFilter", filterNotCaseSensitive);
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/BeanToFileTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/BeanToFileTest.java
index 89cbd6b3fa0..98ba4a959cc 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/BeanToFileTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/BeanToFileTest.java
@@ -41,8 +41,8 @@ public class BeanToFileTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
index ed9d5a0338e..64665911179 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
@@ -32,8 +32,8 @@ public class FileBeginFailureOneTimeTest extends ContextTestSupport {
private MyStrategy myStrategy = new MyStrategy();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myStrategy", myStrategy);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBridgeRouteExceptionHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBridgeRouteExceptionHandlerTest.java
index 6a4f782b896..1795a9793e6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBridgeRouteExceptionHandlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBridgeRouteExceptionHandlerTest.java
@@ -49,8 +49,8 @@ public class FileConsumerBridgeRouteExceptionHandlerTest extends ContextTestSupp
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myReadLockStrategy", myReadLockStrategy);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameStrategyTest.java
index 9ee822d64a0..371e8081867 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameStrategyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameStrategyTest.java
@@ -40,7 +40,8 @@ public class FileConsumerCommitRenameStrategyTest extends ContextTestSupport {
template.sendBodyAndHeader(fileUri("reports"), "Hello Paris", Exchange.FILE_NAME, "paris.txt");
- mock.assertIsSatisfied();
+ // wait a bit to give the filesystem time to complete the operation before checking the result
+ mock.assertIsSatisfied(1000L);
}
@Test
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
index 1999d95fd2d..64fba646bcd 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
@@ -55,8 +55,8 @@ public class FileConsumerCustomExceptionHandlerTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myExceptionHandler", myExceptionHandler);
jndi.bind("myReadLockStrategy", myReadLockStrategy);
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomSchedulerTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomSchedulerTest.java
index 4ee8b570ca2..07b6df79b95 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomSchedulerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomSchedulerTest.java
@@ -35,8 +35,8 @@ public class FileConsumerCustomSchedulerTest extends ContextTestSupport {
private MyScheduler scheduler = new MyScheduler();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myScheduler", scheduler);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryFilterTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryFilterTest.java
index 14155249fcf..485416175e2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryFilterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryFilterTest.java
@@ -39,8 +39,8 @@ public class FileConsumerDirectoryFilterTest extends ContextTestSupport {
private final Set<String> names = new TreeSet<>();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myFilter", new MyDirectoryFilter<>());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
index e2e0c6c4a17..cc5fd709a6b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
@@ -29,8 +29,8 @@ import org.junit.jupiter.api.Test;
public class FileConsumerFileExpressionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("counter", new MyGuidGenerator());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionThrowExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionThrowExceptionTest.java
index e75c22b0cd4..949e754ea39 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionThrowExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionThrowExceptionTest.java
@@ -44,8 +44,8 @@ public class FileConsumerFileExpressionThrowExceptionTest extends ContextTestSup
private static final CountDownLatch LATCH = new CountDownLatch(1);
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("counter", new MyGuidGenerator());
jndi.bind("myPoll", new MyPollStrategy());
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
index 388b118a9a1..02d3c29061c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
@@ -29,8 +29,8 @@ import org.junit.jupiter.api.Test;
public class FileConsumerFileFilterTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myFilter", new MyFileFilter<>());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentRefTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentRefTest.java
index 48972e94f35..8bbab77760c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentRefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentRefTest.java
@@ -39,8 +39,8 @@ public class FileConsumerIdempotentRefTest extends ContextTestSupport {
private static volatile boolean invoked;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myRepo", new MyIdempotentRepository());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveExpressionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveExpressionTest.java
index f500da97d8a..de192cae6c1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveExpressionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveExpressionTest.java
@@ -39,8 +39,8 @@ public class FileConsumerMoveExpressionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myguidgenerator", new MyGuidGenerator());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyNotBeginTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyNotBeginTest.java
index d84fa3f7e88..67ff0845a97 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyNotBeginTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyNotBeginTest.java
@@ -40,8 +40,8 @@ public class FileConsumerPollStrategyNotBeginTest extends ContextTestSupport {
private static volatile String event = "";
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myPoll", new MyPollStrategy());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
index 77654d39a5b..4ad9b16f0dc 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
@@ -41,8 +41,8 @@ public class FileConsumerPollStrategyPolledMessagesTest extends ContextTestSuppo
private final CountDownLatch latch = new CountDownLatch(1);
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myPoll", new MyPollStrategy());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyRollbackThrowExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyRollbackThrowExceptionTest.java
index e08a8902e8b..9768faeb969 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyRollbackThrowExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyRollbackThrowExceptionTest.java
@@ -41,8 +41,8 @@ public class FileConsumerPollStrategyRollbackThrowExceptionTest extends ContextT
private static final CountDownLatch LATCH = new CountDownLatch(1);
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myPoll", new MyPollStrategy());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java
index 472cd02226b..529a33bd988 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java
@@ -43,8 +43,8 @@ public class FileConsumerPollStrategyStopOnRollbackTest extends ContextTestSuppo
private static volatile String event = "";
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myPoll", new MyPollStrategy());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyTest.java
index b3abb6ef1cd..79c8c57c45e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyTest.java
@@ -40,8 +40,8 @@ public class FileConsumerPollStrategyTest extends ContextTestSupport {
private static String event = "";
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myPoll", new MyPollStrategy());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileMarkerFileRecursiveFilterDeleteOldLockFilesTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileMarkerFileRecursiveFilterDeleteOldLockFilesTest.java
index 4796cbc3896..b6f740ad53f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileMarkerFileRecursiveFilterDeleteOldLockFilesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileMarkerFileRecursiveFilterDeleteOldLockFilesTest.java
@@ -28,8 +28,8 @@ import org.junit.jupiter.api.Test;
public class FileMarkerFileRecursiveFilterDeleteOldLockFilesTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myFilter", new MyFileFilter());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
index c355273efe8..76532933f76 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
@@ -33,8 +33,8 @@ import org.junit.jupiter.api.condition.OS;
public class FileProducerExpressionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myguidgenerator", new MyGuidGenerator());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerMoveExistingStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerMoveExistingStrategyTest.java
index 895727fac5e..72eb2caa0e7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerMoveExistingStrategyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerMoveExistingStrategyTest.java
@@ -36,8 +36,8 @@ public class FileProducerMoveExistingStrategyTest extends ContextTestSupport {
private MyStrategy myStrategy = new MyStrategy();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myStrategy", myStrategy);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerRenameUsingCopyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerRenameUsingCopyTest.java
index 5419ff0d9d7..c1d30d3028e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerRenameUsingCopyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerRenameUsingCopyTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.file;
+import java.util.concurrent.TimeUnit;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
@@ -33,7 +35,8 @@ public class FileProducerRenameUsingCopyTest extends ContextTestSupport {
template.sendBodyAndHeader(fileUri(), body, Exchange.FILE_NAME, "hello.txt");
- assertMockEndpointsSatisfied();
+ // wait a bit for the file move to be completed
+ assertMockEndpointsSatisfied(1, TimeUnit.SECONDS);
assertFileExists(testFile("done/hello.txt"));
assertFileNotExists(testFile("hello.txt"));
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileSortByExpressionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileSortByExpressionTest.java
index 28b3d07bb38..a287d1de3e1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileSortByExpressionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileSortByExpressionTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.file;
+import java.util.concurrent.TimeUnit;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
@@ -50,7 +52,8 @@ public class FileSortByExpressionTest extends ContextTestSupport {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedBodiesReceived("Hello Paris", "Hello London", "Hello Copenhagen");
- assertMockEndpointsSatisfied();
+ // wait a bit for the file processing to complete
+ assertMockEndpointsSatisfied(1, TimeUnit.SECONDS);
}
@Test
@@ -68,7 +71,8 @@ public class FileSortByExpressionTest extends ContextTestSupport {
MockEndpoint reverse = getMockEndpoint("mock:reverse");
reverse.expectedBodiesReceived("Hello Copenhagen", "Hello London", "Hello Paris");
- assertMockEndpointsSatisfied();
+ // wait a bit for the file processing to complete
+ assertMockEndpointsSatisfied(1, TimeUnit.SECONDS);
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java
index cd02e4395b3..b8651032cd6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java
@@ -31,8 +31,8 @@ import org.junit.jupiter.api.Test;
public class FileSorterRefTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("mySorter", new MyFileSorter<>());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerMoveFailedDoneFileNameTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerMoveFailedDoneFileNameTest.java
index 0f93bae2a84..6502cbbab2d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerMoveFailedDoneFileNameTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerMoveFailedDoneFileNameTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.file;
+import java.util.concurrent.TimeUnit;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
@@ -33,7 +35,8 @@ public class FilerConsumerMoveFailedDoneFileNameTest extends ContextTestSupport
template.sendBodyAndHeader(fileUri(), "Hello World", Exchange.FILE_NAME, "hello.txt");
template.sendBodyAndHeader(fileUri(), "", Exchange.FILE_NAME, "done");
- assertMockEndpointsSatisfied();
+ // wait a bit for the file processing to complete
+ assertMockEndpointsSatisfied(1, TimeUnit.SECONDS);
oneExchangeDone.matchesWaitTime();
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameRouteTest.java
index c649720cbad..652b1bb7405 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameRouteTest.java
@@ -35,8 +35,8 @@ public class FilerProducerDoneFileNameRouteTest extends ContextTestSupport {
private Properties myProp = new Properties();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myProp", myProp);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameTest.java
index f23438d8b11..69eb7623044 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameTest.java
@@ -37,8 +37,8 @@ public class FilerProducerDoneFileNameTest extends ContextTestSupport {
private Properties myProp = new Properties();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myProp", myProp);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/ToFileRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/ToFileRouteTest.java
index e639702e857..3a44e577fc1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/ToFileRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/ToFileRouteTest.java
@@ -42,9 +42,9 @@ public class ToFileRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
// bind our processor in the registry with the given id
- Registry reg = super.createRegistry();
+ Registry reg = super.createCamelRegistry();
reg.bind("processReport", new ProcessReport());
return reg;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockDelayedAsyncTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockDelayedAsyncTest.java
index 4f5f35297c2..12f61eab279 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockDelayedAsyncTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockDelayedAsyncTest.java
@@ -36,8 +36,8 @@ public class FileIdempotentReadLockDelayedAsyncTest extends ContextTestSupport {
MemoryIdempotentRepository myRepo = new MemoryIdempotentRepository();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myRepo", myRepo);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockDelayedTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockDelayedTest.java
index 07fd5ee147b..f6e6940c62c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockDelayedTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockDelayedTest.java
@@ -36,8 +36,8 @@ public class FileIdempotentReadLockDelayedTest extends ContextTestSupport {
MemoryIdempotentRepository myRepo = new MemoryIdempotentRepository();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myRepo", myRepo);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockTest.java
index d9d1f3bc4ec..33bcb88f28f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileIdempotentReadLockTest.java
@@ -36,8 +36,8 @@ public class FileIdempotentReadLockTest extends ContextTestSupport {
MemoryIdempotentRepository myRepo = new MemoryIdempotentRepository();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myRepo", myRepo);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/language/LanguageScriptRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/component/language/LanguageScriptRouteTest.java
index dcad7e82fd3..34f536527d0 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/language/LanguageScriptRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/language/LanguageScriptRouteTest.java
@@ -33,8 +33,8 @@ public class LanguageScriptRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myScript", "Hello ${body}");
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java b/core/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
index 3dd0ad7b477..a9dedfe8977 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
@@ -1223,8 +1223,8 @@ public class MockEndpointTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyHelloBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentOnExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentOnExceptionTest.java
index b95bd9ba6aa..3e553a73474 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentOnExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentOnExceptionTest.java
@@ -57,8 +57,8 @@ public class PropertiesComponentOnExceptionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
Properties cool = new Properties();
cool.put("delay", "25");
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentSomethingElseBoundToJndiTest.java b/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentSomethingElseBoundToJndiTest.java
index ec15528411e..d7e20049ac5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentSomethingElseBoundToJndiTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentSomethingElseBoundToJndiTest.java
@@ -51,8 +51,8 @@ public class PropertiesComponentSomethingElseBoundToJndiTest extends ContextTest
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
// bind something else as properties, but this should not cause Camel to
// fail start
jndi.bind("properties", this);
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestAdviceWithTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestAdviceWithTest.java
index e86e8725807..99823029ed3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestAdviceWithTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestAdviceWithTest.java
@@ -29,8 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class FromRestAdviceWithTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestApiTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestApiTest.java
index 5eff03b7082..593cfea659c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestApiTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestApiTest.java
@@ -29,8 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class FromRestApiTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
jndi.bind("dummy-rest-api", new DummyRestProcessorFactory());
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestConfigurationTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestConfigurationTest.java
index 71c2d833c6a..eac616c1615 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestConfigurationTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestConfigurationTest.java
@@ -27,8 +27,8 @@ import static org.junit.jupiter.api.Assertions.assertSame;
public class FromRestConfigurationTest extends FromRestGetTest {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDummy", new FooBar());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java
index a39b078d17d..8e35ca988be 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java
@@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test;
public class FromRestDefaultValueTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDisabledAllTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDisabledAllTest.java
index 95c64b9c16a..56bfc7a932b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDisabledAllTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDisabledAllTest.java
@@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test;
public class FromRestDisabledAllTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDisabledTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDisabledTest.java
index 0e212d60b6b..cff90247dd7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDisabledTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDisabledTest.java
@@ -26,8 +26,8 @@ import org.junit.jupiter.api.Test;
public class FromRestDisabledTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDuplicateTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDuplicateTest.java
index 22ad030c8e2..c5a6d6cfe90 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDuplicateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDuplicateTest.java
@@ -32,8 +32,8 @@ public class FromRestDuplicateTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetContentTypeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetContentTypeTest.java
index aca323dc253..7ea8aee5424 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetContentTypeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetContentTypeTest.java
@@ -29,8 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class FromRestGetContentTypeTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsAllowCredentialsTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsAllowCredentialsTest.java
index f3068b91b28..8eb57abe1ff 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsAllowCredentialsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsAllowCredentialsTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class FromRestGetCorsAllowCredentialsTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsCustomTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsCustomTest.java
index 2543ac67819..c0b56243d3d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsCustomTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsCustomTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class FromRestGetCorsCustomTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsTest.java
index 594c8c3e0ff..df852d218d0 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetCorsTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class FromRestGetCorsTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetHttpErrorCodeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetHttpErrorCodeTest.java
index f9c0c505a5b..7cd3f7ef4d3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetHttpErrorCodeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetHttpErrorCodeTest.java
@@ -29,8 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class FromRestGetHttpErrorCodeTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetInterceptTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetInterceptTest.java
index ba3eef10e25..a0278c9ba8c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetInterceptTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetInterceptTest.java
@@ -26,8 +26,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class FromRestGetInterceptTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetOnExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetOnExceptionTest.java
index 553c31958e7..3aa6b0808d4 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetOnExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetOnExceptionTest.java
@@ -26,8 +26,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class FromRestGetOnExceptionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPlaceholderParamTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPlaceholderParamTest.java
index 6abc8a82ba3..8c207ea949d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPlaceholderParamTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPlaceholderParamTest.java
@@ -33,8 +33,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class FromRestGetPlaceholderParamTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("dummy-rest", new DummyRestConsumerFactory());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPolicyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPolicyTest.java
index 376b9149f8b..394c416f54d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPolicyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetPolicyTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class FromRestGetPolicyTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
index 2856445e2ed..0e89ba18cae 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
@@ -34,8 +34,8 @@ import static org.junit.jupiter.api.Assertions.assertNull;
public class FromRestGetTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestInlineRoutesTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestInlineRoutesTest.java
index f5eed728bb3..3505746143d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestInlineRoutesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestInlineRoutesTest.java
@@ -26,8 +26,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class FromRestInlineRoutesTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestPathPlaceholderTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestPathPlaceholderTest.java
index 0cdb9acdecd..fe703ec7355 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestPathPlaceholderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestPathPlaceholderTest.java
@@ -28,8 +28,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class FromRestPathPlaceholderTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/RestComponentVerifierExtensionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/RestComponentVerifierExtensionTest.java
index 34f1e12650d..8614ec9ae2a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/RestComponentVerifierExtensionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/RestComponentVerifierExtensionTest.java
@@ -40,8 +40,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class RestComponentVerifierExtensionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("rest", new RestComponent());
registry.bind("rest-component", new MyComponent());
return registry;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/rest/RestComponentVerifierTest.java b/core/camel-core/src/test/java/org/apache/camel/component/rest/RestComponentVerifierTest.java
index b3eb04921a0..c1a658830e8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/rest/RestComponentVerifierTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/rest/RestComponentVerifierTest.java
@@ -40,8 +40,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class RestComponentVerifierTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("rest", new RestComponent());
registry.bind("rest-component", new MyComponent());
return registry;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/scheduler/SchedulerRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/component/scheduler/SchedulerRouteTest.java
index 3a6b75fabba..2fc6e07253e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/scheduler/SchedulerRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/scheduler/SchedulerRouteTest.java
@@ -52,8 +52,8 @@ public class SchedulerRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", bean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaBlockWhenFullTest.java b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaBlockWhenFullTest.java
index a50259eaa37..ddd40ddd984 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaBlockWhenFullTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaBlockWhenFullTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.seda;
+import java.util.concurrent.TimeUnit;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.junit.jupiter.api.Test;
@@ -95,7 +97,8 @@ public class SedaBlockWhenFullTest extends ContextTestSupport {
assertEquals(QUEUE_SIZE, seda.getQueue().remainingCapacity());
asyncSendTwoOverCapacity(BLOCK_WHEN_FULL_URI, QUEUE_SIZE + 4);
- assertMockEndpointsSatisfied();
+ // wait a bit to allow the async processing to complete
+ assertMockEndpointsSatisfied(2, TimeUnit.SECONDS);
}
/**
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentConsumersTest.java b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentConsumersTest.java
index fc2dd9030c7..8916e753350 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentConsumersTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentConsumersTest.java
@@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test;
public class SedaConcurrentConsumersTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("count", "5");
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaConsumerSuspendResumeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaConsumerSuspendResumeTest.java
index c7abd8c8d2f..c606d398e10 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaConsumerSuspendResumeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaConsumerSuspendResumeTest.java
@@ -63,6 +63,12 @@ public class SedaConsumerSuspendResumeTest extends ContextTestSupport {
.until(() -> context.getEndpoint("seda:foo", SedaEndpoint.class).getQueue().size() == 0
&& context.getEndpoint("seda:bar", SedaEndpoint.class).getQueue().size() == 0);
+ // even though we wait for the queues to empty, there is a race condition where the consumer
+ // may still process messages while it's being suspended due to asynchronous message handling.
+ // as a result, we need to wait a bit longer to ensure that the seda consumer is suspended before
+ // sending the next message.
+ Thread.sleep(1000L);
+
template.sendBody("seda:foo", "B");
// wait a little to ensure seda consumer thread would have tried to poll
// otherwise
@@ -85,6 +91,7 @@ public class SedaConsumerSuspendResumeTest extends ContextTestSupport {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
+ context.setTracing(true);
from("seda:foo").routeId("foo").to("seda:bar");
from("seda:bar").routeId("bar").to("mock:bar");
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaDefaultBlockWhenFullTest.java b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaDefaultBlockWhenFullTest.java
index 48167cb9d42..d99a032b3ac 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaDefaultBlockWhenFullTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaDefaultBlockWhenFullTest.java
@@ -43,11 +43,11 @@ public class SedaDefaultBlockWhenFullTest extends ContextTestSupport {
= "seda:foo" + String.format(SIZE_PARAM, QUEUE_SIZE) + "&blockWhenFull=false&timeout=0";
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
SedaComponent component = new SedaComponent();
component.setDefaultBlockWhenFull(true);
- Registry registry = super.createRegistry();
+ Registry registry = super.createCamelRegistry();
registry.bind("seda", component);
return registry;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerGracefulShutdownTest.java b/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerGracefulShutdownTest.java
index e68620d4f11..1cc031dd7fe 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerGracefulShutdownTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerGracefulShutdownTest.java
@@ -32,8 +32,8 @@ public class TimerGracefulShutdownTest extends ContextTestSupport {
private MyExceptionHandler eh = new MyExceptionHandler();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("eh", eh);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerReferenceConfigurationTest.java b/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerReferenceConfigurationTest.java
index 6376652503c..99708a2d3f2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerReferenceConfigurationTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerReferenceConfigurationTest.java
@@ -64,8 +64,8 @@ public class TimerReferenceConfigurationTest extends ContextTestSupport {
final String mockEndpointUri = "mock:result";
@Override
- protected Registry createRegistry() throws Exception {
- Registry reg = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry reg = super.createCamelRegistry();
reg.bind("refExpectedTimeString", refExpectedTimeString);
reg.bind("refExpectedPattern", refExpectedPattern);
reg.bind("refExpectedPeriod", refExpectedPeriod);
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerRouteTest.java
index de5d2e51aa6..be9e5d922f5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerRouteTest.java
@@ -52,8 +52,8 @@ public class TimerRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", bean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/validator/CustomSchemaFactoryFeatureTest.java b/core/camel-core/src/test/java/org/apache/camel/component/validator/CustomSchemaFactoryFeatureTest.java
index 59793ec1598..47f6e2713ac 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/validator/CustomSchemaFactoryFeatureTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/validator/CustomSchemaFactoryFeatureTest.java
@@ -26,8 +26,8 @@ import org.junit.jupiter.api.Test;
public class CustomSchemaFactoryFeatureTest extends ContextTestSupport {
// Need to bind the CustomerSchemaFactory
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
SchemaFactory mySchemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
mySchemaFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false);
registry.bind("MySchemaFactory", mySchemaFactory);
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorBeanCallTest.java b/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorBeanCallTest.java
index c0766e564c8..2a46e97241b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorBeanCallTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorBeanCallTest.java
@@ -55,8 +55,8 @@ public class ValidatorBeanCallTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyValidatorBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorResourceResolverFactoryTest.java b/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorResourceResolverFactoryTest.java
index b67bcd659c9..0346b9b5ca9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorResourceResolverFactoryTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorResourceResolverFactoryTest.java
@@ -112,7 +112,7 @@ public class ValidatorResourceResolverFactoryTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
jndiContext = createJndiContext();
jndiContext.bind("resourceResolverFactory", new ResourceResolverFactoryImpl());
return new DefaultRegistry(new JndiBeanRepository(jndiContext));
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeEntityResolverTest.java b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeEntityResolverTest.java
index 88c108db2bc..8d978571cbc 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeEntityResolverTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeEntityResolverTest.java
@@ -65,8 +65,8 @@ public class XsltCustomizeEntityResolverTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
EntityResolver customEntityResolver = getCustomEntityResolver();
registry.bind("customEntityResolver", customEntityResolver);
return registry;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java
index 3d7d3532623..7de3e730a72 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java
@@ -80,8 +80,8 @@ public class XsltCustomizeURIResolverTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
URIResolver customURIResolver = getCustomURIResolver();
registry.bind("customURIResolver", customURIResolver);
return registry;
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltRouteTest.java
index 4308006c75a..32a73d9355e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltRouteTest.java
@@ -87,8 +87,8 @@ public class XsltRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("testBean", new TestBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltUriResolverFactoryTest.java b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltUriResolverFactoryTest.java
index fc3263cb104..1cc4269105c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltUriResolverFactoryTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltUriResolverFactoryTest.java
@@ -114,7 +114,7 @@ public class XsltUriResolverFactoryTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
jndiContext = createJndiContext();
jndiContext.bind("uriResolverFactory", new CustomXsltUriResolverFactory());
return new DefaultRegistry(new JndiBeanRepository(jndiContext));
diff --git a/core/camel-core/src/test/java/org/apache/camel/converter/FallbackPromoteTest.java b/core/camel-core/src/test/java/org/apache/camel/converter/FallbackPromoteTest.java
index 766d7325ae8..3112d70638b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/converter/FallbackPromoteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/converter/FallbackPromoteTest.java
@@ -24,11 +24,6 @@ import static org.junit.jupiter.api.Assertions.*;
public class FallbackPromoteTest extends ContextTestSupport {
- @Override
- protected boolean isLoadTypeConverters() {
- return true;
- }
-
@Test
public void testFallbackPromote() throws Exception {
MyCoolBean cool = new MyCoolBean();
diff --git a/core/camel-core/src/test/java/org/apache/camel/converter/StaticFallbackConverterTest.java b/core/camel-core/src/test/java/org/apache/camel/converter/StaticFallbackConverterTest.java
index 5c20717de66..a415054af3a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/converter/StaticFallbackConverterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/converter/StaticFallbackConverterTest.java
@@ -30,11 +30,6 @@ import static org.junit.jupiter.api.Assertions.*;
public class StaticFallbackConverterTest extends ContextTestSupport {
- @Override
- protected boolean isLoadTypeConverters() {
- return true;
- }
-
@Test
public void testStaticFallbackConverter() throws Exception {
Exchange exchange = new DefaultExchange(context);
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/BeanInjectRouteBuilderTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/BeanInjectRouteBuilderTest.java
index 971a97a1957..943562cb366 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/BeanInjectRouteBuilderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/BeanInjectRouteBuilderTest.java
@@ -33,8 +33,8 @@ public class BeanInjectRouteBuilderTest extends ContextTestSupport {
private FooBar foo;
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("foo", new FooBar());
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/CamelContextAddRestDefinitionsFromXmlTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/CamelContextAddRestDefinitionsFromXmlTest.java
index 627e9d34bec..66a50acd3e6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/CamelContextAddRestDefinitionsFromXmlTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/CamelContextAddRestDefinitionsFromXmlTest.java
@@ -42,8 +42,8 @@ public class CamelContextAddRestDefinitionsFromXmlTest extends ContextTestSuppor
protected JAXBContext jaxbContext;
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("dummy-rest", new DummyRestConsumerFactory());
registry.bind("dummy-rest-api", new DummyRestProcessorFactory());
return registry;
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/CamelProduceInterfaceEventNotifierTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/CamelProduceInterfaceEventNotifierTest.java
index c3de76a5635..47c8f6f07a4 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/CamelProduceInterfaceEventNotifierTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/CamelProduceInterfaceEventNotifierTest.java
@@ -40,7 +40,7 @@ public class CamelProduceInterfaceEventNotifierTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
if (event instanceof CamelEvent.ExchangeSendingEvent || event instanceof CamelEvent.ExchangeSentEvent) {
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DataFormatContextAwareTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DataFormatContextAwareTest.java
index 87054eedc24..6db754c5509 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DataFormatContextAwareTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DataFormatContextAwareTest.java
@@ -38,8 +38,8 @@ public class DataFormatContextAwareTest extends ContextTestSupport {
private MyDataFormat my = new MyDataFormat();
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("my", my);
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DataFormatPropertyPlaceholderTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DataFormatPropertyPlaceholderTest.java
index a8363fcd812..a80186cbba9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DataFormatPropertyPlaceholderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DataFormatPropertyPlaceholderTest.java
@@ -39,8 +39,8 @@ public class DataFormatPropertyPlaceholderTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("reverse", new RefDataFormatTest.MyReverseDataFormat());
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelBeanPostProcessorComplexFieldFirstTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelBeanPostProcessorComplexFieldFirstTest.java
index 4ce860ca253..a8ae834c755 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelBeanPostProcessorComplexFieldFirstTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelBeanPostProcessorComplexFieldFirstTest.java
@@ -28,6 +28,7 @@ import org.apache.camel.BeanInject;
import org.apache.camel.BindToRegistry;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.spi.CamelBeanPostProcessor;
+import org.apache.camel.spi.Registry;
import org.apache.camel.support.PluginHelper;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -39,12 +40,17 @@ public class DefaultCamelBeanPostProcessorComplexFieldFirstTest extends ContextT
private CamelBeanPostProcessor postProcessor;
+ @Override
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
+ answer.bind("myDS", new DummyDataSource());
+ return answer;
+ }
+
@Test
public void testPostProcessor() throws Exception {
FooService foo = new FooService();
- context.getRegistry().bind("myDS", new DummyDataSource());
-
postProcessor.postProcessBeforeInitialization(foo, "foo");
postProcessor.postProcessAfterInitialization(foo, "foo");
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextSuspendResumeRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextSuspendResumeRouteTest.java
index d9be8fb14dd..9295717f0e9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextSuspendResumeRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextSuspendResumeRouteTest.java
@@ -49,6 +49,12 @@ public class DefaultCamelContextSuspendResumeRouteTest extends ContextTestSuppor
context.suspend();
+ // even though we wait for the route to suspend, there is a race condition where the consumer
+ // may still process messages while it's being suspended due to asynchronous message handling.
+ // as a result, we need to wait a bit longer to ensure that the seda consumer is suspended before
+ // sending the next message.
+ Thread.sleep(1000L);
+
// need to give seda consumer thread time to idle
Awaitility.await().atMost(200, TimeUnit.MILLISECONDS)
.pollDelay(100, TimeUnit.MILLISECONDS)
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentAutowiredFalseTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentAutowiredFalseTest.java
index d1bf0161a73..a6c023d1f31 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentAutowiredFalseTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentAutowiredFalseTest.java
@@ -39,8 +39,8 @@ import org.junit.jupiter.api.Test;
public class DefaultComponentAutowiredFalseTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry reg = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry reg = super.createCamelRegistry();
reg.bind("mycomponent-component", new MyComponentConfigurer());
reg.bind("mycomponent-endpoint-configurer", new MyComponentConfigurer());
reg.bind("chf", new MyContentHandlerFactory());
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentAutowiredTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentAutowiredTest.java
index 480614055ef..72530e98928 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentAutowiredTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentAutowiredTest.java
@@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test;
public class DefaultComponentAutowiredTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry reg = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry reg = super.createCamelRegistry();
reg.bind("mycomponent-component", new MyComponentConfigurer());
reg.bind("chf", new MyContentHandlerFactory());
return reg;
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentReferencePropertiesTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentReferencePropertiesTest.java
index 779707bc9ef..35c742967b1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentReferencePropertiesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentReferencePropertiesTest.java
@@ -109,8 +109,8 @@ public class DefaultComponentReferencePropertiesTest extends ContextTestSupport
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("myExpression", ExpressionBuilder.bodyExpression());
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentTest.java
index 6e6a67dad5a..a6738881c30 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultComponentTest.java
@@ -271,10 +271,10 @@ public class DefaultComponentTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
Date bean1 = new Date(10);
Date bean2 = new Date(11);
- Registry registry = super.createRegistry();
+ Registry registry = super.createCamelRegistry();
registry.bind("beginning", new Date(0));
registry.bind("bean1", bean1);
registry.bind("bean2", bean2);
@@ -283,5 +283,4 @@ public class DefaultComponentTest extends ContextTestSupport {
registry.bind("non-numeric", "abc");
return registry;
}
-
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/LanguageCamelContextAwareTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/LanguageCamelContextAwareTest.java
index 9ac3f219417..d19ae3ed285 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/LanguageCamelContextAwareTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/LanguageCamelContextAwareTest.java
@@ -35,8 +35,8 @@ public class LanguageCamelContextAwareTest extends ContextTestSupport {
private MyLanguage my = new MyLanguage();
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("my", my);
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsOffTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsOffTest.java
index 7d7f7e595d7..83d89dc9702 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsOffTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsOffTest.java
@@ -37,8 +37,8 @@ public class LogDebugBodyMaxCharsOffTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("logFormatter", new TraceExchangeFormatter());
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsTest.java
index 0f02a57e1c1..23791f480a5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsTest.java
@@ -37,8 +37,8 @@ public class LogDebugBodyMaxCharsTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("logFormatter", new TraceExchangeFormatter());
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyStreamsTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyStreamsTest.java
index e6bea79458e..ae82c76b489 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyStreamsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyStreamsTest.java
@@ -40,8 +40,8 @@ public class LogDebugBodyStreamsTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("logFormatter", new TraceExchangeFormatter());
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/RefDataFormatTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/RefDataFormatTest.java
index 71dee139854..4dc82b219ca 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/RefDataFormatTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/RefDataFormatTest.java
@@ -33,8 +33,8 @@ import org.junit.jupiter.api.Test;
public class RefDataFormatTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("reverse", new MyReverseDataFormat());
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/RouteIdRestDefinitionTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/RouteIdRestDefinitionTest.java
index 73264f43d07..7bed37b78ce 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/RouteIdRestDefinitionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/RouteIdRestDefinitionTest.java
@@ -28,8 +28,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class RouteIdRestDefinitionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("dummy-rest", new DummyRestConsumerFactory());
registry.bind("dummy-rest-api", new DummyRestProcessorFactory());
return registry;
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/RoutePolicyRefCallbackTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/RoutePolicyRefCallbackTest.java
index 255f3ba805a..1afe47b756e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/RoutePolicyRefCallbackTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/RoutePolicyRefCallbackTest.java
@@ -25,8 +25,8 @@ import org.apache.camel.spi.Registry;
public class RoutePolicyRefCallbackTest extends RoutePolicyCallbackTest {
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("myPolicy", policy);
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/RouteSedaSuspendResumeTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/RouteSedaSuspendResumeTest.java
index 646a0a12e52..1eef470bdce 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/RouteSedaSuspendResumeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/RouteSedaSuspendResumeTest.java
@@ -53,6 +53,7 @@ public class RouteSedaSuspendResumeTest extends ContextTestSupport {
assertEquals("Suspended", ((StatefulService) route).getStatus().name());
}
+ Thread.sleep(1000L);
// need to give seda consumer thread time to idle
await().atMost(1, TimeUnit.SECONDS)
.until(() -> context.getEndpoint("seda:foo", SedaEndpoint.class).getQueue().size() == 0);
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/StartupListenerComponentFromRegistryTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/StartupListenerComponentFromRegistryTest.java
index 38569fcd542..6af9d029299 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/StartupListenerComponentFromRegistryTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/StartupListenerComponentFromRegistryTest.java
@@ -32,10 +32,10 @@ public class StartupListenerComponentFromRegistryTest extends ContextTestSupport
private MyComponent my;
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
my = new MyComponent();
- Registry jndi = super.createRegistry();
+ Registry jndi = super.createCamelRegistry();
jndi.bind("my", my);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/TwoRouteSuspendResumeTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/TwoRouteSuspendResumeTest.java
index 4ba040c334c..2fabdc27cc6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/TwoRouteSuspendResumeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/TwoRouteSuspendResumeTest.java
@@ -54,6 +54,12 @@ public class TwoRouteSuspendResumeTest extends ContextTestSupport {
return context.getEndpoint("seda:foo", SedaEndpoint.class).getQueue().size() == 0;
});
+ // even though we wait for the queues to empty, there is a race condition where the consumer
+ // may still process messages while it's being suspended due to asynchronous message handling.
+ // as a result, we need to wait a bit longer to ensure that the seda consumer is suspended before
+ // sending the next message.
+ Thread.sleep(1000L);
+
template.sendBody("seda:foo", "B");
template.sendBody("direct:bar", "C");
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/engine/CamelPostProcessorHelperTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/engine/CamelPostProcessorHelperTest.java
index c063641c9e7..9562bce0174 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/engine/CamelPostProcessorHelperTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/engine/CamelPostProcessorHelperTest.java
@@ -61,7 +61,7 @@ public class CamelPostProcessorHelperTest extends ContextTestSupport {
private Properties myProp = new Properties();
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
Registry jndi = new DefaultRegistry();
jndi.bind("myProp", myProp);
jndi.bind("foo", new FooBar());
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/event/CamelEventsTimestampEnabledTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/event/CamelEventsTimestampEnabledTest.java
index a4cd3933cf7..e3c329cefec 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/event/CamelEventsTimestampEnabledTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/event/CamelEventsTimestampEnabledTest.java
@@ -35,7 +35,7 @@ public class CamelEventsTimestampEnabledTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
// enable timestamp
context.getManagementStrategy().getEventFactory().setTimestampEnabled(true);
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeCompletedTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeCompletedTest.java
index 3cfe101fe43..cf44bd22cc3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeCompletedTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeCompletedTest.java
@@ -36,7 +36,7 @@ public class EventNotifierExchangeCompletedTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
events.add(event);
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeSentTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeSentTest.java
index 223476d26b0..64c6b64b3d1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeSentTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierExchangeSentTest.java
@@ -44,7 +44,7 @@ public class EventNotifierExchangeSentTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
events.add(event);
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierFailureHandledEventsTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierFailureHandledEventsTest.java
index c35553dbef3..b46d9f6de2a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierFailureHandledEventsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierFailureHandledEventsTest.java
@@ -43,7 +43,7 @@ public class EventNotifierFailureHandledEventsTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
events.add(event);
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierRedeliveryEventsTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierRedeliveryEventsTest.java
index f6107dd1d46..e27775802d1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierRedeliveryEventsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/event/EventNotifierRedeliveryEventsTest.java
@@ -41,7 +41,7 @@ public class EventNotifierRedeliveryEventsTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
events.add(event);
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/event/MultipleEventNotifierEventsTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/event/MultipleEventNotifierEventsTest.java
index 7ad5f8cc34d..b75887f0541 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/event/MultipleEventNotifierEventsTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/event/MultipleEventNotifierEventsTest.java
@@ -42,7 +42,7 @@ public class MultipleEventNotifierEventsTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
events.add(event);
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionErrorHandlerRefIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionErrorHandlerRefIssueTest.java
index 78ccae3e3d2..2a33d87b3ab 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionErrorHandlerRefIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionErrorHandlerRefIssueTest.java
@@ -39,8 +39,8 @@ public class ContextScopedOnExceptionErrorHandlerRefIssueTest extends ContextTes
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionErrorHandlerRefIssueTwoRoutesTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionErrorHandlerRefIssueTwoRoutesTest.java
index cb0ff48f81a..fb450470244 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionErrorHandlerRefIssueTwoRoutesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionErrorHandlerRefIssueTwoRoutesTest.java
@@ -53,8 +53,8 @@ public class ContextScopedOnExceptionErrorHandlerRefIssueTwoRoutesTest extends C
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTest.java
index 6d4d0d42186..4e823086647 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTest.java
@@ -48,8 +48,8 @@ public class ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTest extends
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest.java
index 69c90a620a3..595c27ca8ed 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest.java
@@ -61,8 +61,8 @@ public class ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTest.java
index 6523ed2c698..4d4640126b1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTest.java
@@ -49,8 +49,8 @@ public class ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTe
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
index 0ea8fc8b6d8..e347cfe7527 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
@@ -61,8 +61,8 @@ public class ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTw
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTest.java
index d4e55425dd4..faaf17ba404 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTest.java
@@ -40,8 +40,8 @@ public class ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTest extends
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
index ac75f8733c5..a3a98439b25 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
@@ -52,8 +52,8 @@ public class ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTes
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionErrorHandlerRefIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionErrorHandlerRefIssueTest.java
index 599ccc3bc6f..69e8f426225 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionErrorHandlerRefIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionErrorHandlerRefIssueTest.java
@@ -39,8 +39,8 @@ public class OnExceptionErrorHandlerRefIssueTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionErrorHandlerRefIssueTwoRoutesTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionErrorHandlerRefIssueTwoRoutesTest.java
index 15e978efeaf..052ff0b1028 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionErrorHandlerRefIssueTwoRoutesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionErrorHandlerRefIssueTwoRoutesTest.java
@@ -50,8 +50,8 @@ public class OnExceptionErrorHandlerRefIssueTwoRoutesTest extends ContextTestSup
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledErrorHandlerRefIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledErrorHandlerRefIssueTest.java
index f125a60f762..dac73ba3c41 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledErrorHandlerRefIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledErrorHandlerRefIssueTest.java
@@ -49,8 +49,8 @@ public class OnExceptionNotHandledErrorHandlerRefIssueTest extends ContextTestSu
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest.java
index 73af082df6b..3ccdeac90d0 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest.java
@@ -60,8 +60,8 @@ public class OnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest extends Cont
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTest.java
index 969c670f983..7f63a33ec7c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTest.java
@@ -49,8 +49,8 @@ public class OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTest extends Co
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
index 1476f58e4b9..a7bfb9c367d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
@@ -60,8 +60,8 @@ public class OnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest e
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionRouteScopedErrorHandlerRefIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionRouteScopedErrorHandlerRefIssueTest.java
index 507f954142d..c759cbe4d31 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionRouteScopedErrorHandlerRefIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionRouteScopedErrorHandlerRefIssueTest.java
@@ -39,8 +39,8 @@ public class OnExceptionRouteScopedErrorHandlerRefIssueTest extends ContextTestS
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
index 7764d10dd04..00ebaca656d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest.java
@@ -50,8 +50,8 @@ public class OnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest extends Con
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionWithTwoBeansTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionWithTwoBeansTest.java
index 9a0206b5d04..1ae0127aaec 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionWithTwoBeansTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionWithTwoBeansTest.java
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
public class OnExceptionWithTwoBeansTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
Registry registry = new DefaultRegistry();
registry.bind("checkin", new MyBean1());
registry.bind("handler", new MyBean2());
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/RecipientListUseOriginalMessageEndpointExceptionIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/RecipientListUseOriginalMessageEndpointExceptionIssueTest.java
index 96e8bd2c5e9..74f06eacff6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/RecipientListUseOriginalMessageEndpointExceptionIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/RecipientListUseOriginalMessageEndpointExceptionIssueTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.issues;
+import java.util.concurrent.TimeUnit;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
@@ -42,7 +44,7 @@ public class RecipientListUseOriginalMessageEndpointExceptionIssueTest extends C
template.sendBodyAndHeader(fileUri("inbox"), "A",
Exchange.FILE_NAME, "hello.txt");
- assertMockEndpointsSatisfied();
+ assertMockEndpointsSatisfied(100, TimeUnit.MILLISECONDS);
}
@Override
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListIssueTest.java
index ae3b338b619..8f69761e593 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListIssueTest.java
@@ -49,8 +49,8 @@ public class RetryRouteScopedUntilRecipientListIssueTest extends ContextTestSupp
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myRetryBean", new MyRetryBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/RouteScopedOnExceptionMultipleRouteBuildersTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/RouteScopedOnExceptionMultipleRouteBuildersTest.java
index e9c488ed57d..5b4bb7ace3e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/RouteScopedOnExceptionMultipleRouteBuildersTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/RouteScopedOnExceptionMultipleRouteBuildersTest.java
@@ -51,7 +51,7 @@ public class RouteScopedOnExceptionMultipleRouteBuildersTest extends ContextTest
@Override
protected CamelContext createCamelContext() throws Exception {
- CamelContext context = new DefaultCamelContext(createRegistry());
+ CamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getCamelContextExtension().setErrorHandlerFactory(new DeadLetterChannelBuilder("mock:dead"));
return context;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/SedaFileIdempotentIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/SedaFileIdempotentIssueTest.java
index 7cad40046b1..fe698679c28 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/SedaFileIdempotentIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/SedaFileIdempotentIssueTest.java
@@ -54,8 +54,8 @@ public class SedaFileIdempotentIssueTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
repository.setFileStore(testFile("repo.txt").toFile());
jndi.bind("repo", repository);
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/SetHeaderInDoCatchIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/SetHeaderInDoCatchIssueTest.java
index 50c337c1ab0..c292dfae2c8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/SetHeaderInDoCatchIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/SetHeaderInDoCatchIssueTest.java
@@ -64,7 +64,7 @@ public class SetHeaderInDoCatchIssueTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
Registry registry = new DefaultRegistry();
registry.bind("A", new Processor() {
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/SplitterUsingBeanReturningCloseableIteratorTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/SplitterUsingBeanReturningCloseableIteratorTest.java
index a565fa96741..95b96ab7aa1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/SplitterUsingBeanReturningCloseableIteratorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/SplitterUsingBeanReturningCloseableIteratorTest.java
@@ -33,8 +33,8 @@ import static org.junit.jupiter.api.Assertions.fail;
public class SplitterUsingBeanReturningCloseableIteratorTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("mySplitter", new MyOtherSplitterBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/SplitterUsingBeanReturningMessageTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/SplitterUsingBeanReturningMessageTest.java
index a164221abe7..1848a7ac377 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/SplitterUsingBeanReturningMessageTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/SplitterUsingBeanReturningMessageTest.java
@@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class SplitterUsingBeanReturningMessageTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("mySplitter", new MyOtherSplitterBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/TryCatchWithSplitIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/TryCatchWithSplitIssueTest.java
index f81933d5d98..c518749e05c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/TryCatchWithSplitIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/TryCatchWithSplitIssueTest.java
@@ -53,8 +53,8 @@ public class TryCatchWithSplitIssueTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("error", new GenerateError());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/BeanAnnotationParameterTest.java b/core/camel-core/src/test/java/org/apache/camel/language/BeanAnnotationParameterTest.java
index dd04f9da339..839c6debd58 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/BeanAnnotationParameterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/BeanAnnotationParameterTest.java
@@ -66,8 +66,8 @@ public class BeanAnnotationParameterTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("GreetingService", new GreetingService());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/BeanAnnotationParameterTwoTest.java b/core/camel-core/src/test/java/org/apache/camel/language/BeanAnnotationParameterTwoTest.java
index b58047b4460..138de68edb1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/BeanAnnotationParameterTwoTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/BeanAnnotationParameterTwoTest.java
@@ -66,8 +66,8 @@ public class BeanAnnotationParameterTwoTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("GreetingService", new GreetingService());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageOGNLWithDotInParameterPropertyPlaceholderTest.java b/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageOGNLWithDotInParameterPropertyPlaceholderTest.java
index 4025c288182..5e8fc3720d5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageOGNLWithDotInParameterPropertyPlaceholderTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageOGNLWithDotInParameterPropertyPlaceholderTest.java
@@ -39,8 +39,8 @@ public class BeanLanguageOGNLWithDotInParameterPropertyPlaceholderTest extends C
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyDestinationBean());
myProp = new Properties();
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageOGNLWithDotInParameterTest.java b/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageOGNLWithDotInParameterTest.java
index 69625f7aff9..edc314e1e5b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageOGNLWithDotInParameterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageOGNLWithDotInParameterTest.java
@@ -35,8 +35,8 @@ public class BeanLanguageOGNLWithDotInParameterTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyDestinationBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageTest.java b/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageTest.java
index 242c773c3bb..e98ecad5232 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/BeanLanguageTest.java
@@ -29,8 +29,8 @@ class BeanLanguageTest extends AbstractTypedLanguageTest<MethodCallExpression.Bu
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("someBean", new SomeBean());
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/BeanTest.java b/core/camel-core/src/test/java/org/apache/camel/language/BeanTest.java
index fd244369b0d..5921e3f8a02 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/BeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/BeanTest.java
@@ -124,8 +124,8 @@ public class BeanTest extends LanguageTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", new MyBean());
answer.bind("my.company.MyClass", new MyBean());
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java b/core/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java
index 28d88d82827..55173590545 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java
@@ -43,8 +43,8 @@ public class FileLanguageTest extends LanguageTestSupport {
private File file;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("generator", new MyFileNameGenerator());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/LanguageServiceTest.java b/core/camel-core/src/test/java/org/apache/camel/language/LanguageServiceTest.java
index 5bedbd49435..d3023f8a9c3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/LanguageServiceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/LanguageServiceTest.java
@@ -34,8 +34,8 @@ public class LanguageServiceTest extends ContextTestSupport {
private MyLanguage my = new MyLanguage();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("my", my);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/RefLanguageTest.java b/core/camel-core/src/test/java/org/apache/camel/language/RefLanguageTest.java
index fa8f5e922a1..da97f76b49e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/RefLanguageTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/RefLanguageTest.java
@@ -31,8 +31,8 @@ class RefLanguageTest extends AbstractTypedLanguageTest<RefExpression.Builder, R
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("someExpression", new SimpleExpression("${body}"));
return registry;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/RefPredicateTest.java b/core/camel-core/src/test/java/org/apache/camel/language/RefPredicateTest.java
index 887142e2819..7957a4b7a19 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/RefPredicateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/RefPredicateTest.java
@@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test;
public class RefPredicateTest extends LanguageTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myPredicate", new MyPredicate());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/RefTest.java b/core/camel-core/src/test/java/org/apache/camel/language/RefTest.java
index 3d5c6394adc..38cb6fe639c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/RefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/RefTest.java
@@ -28,8 +28,8 @@ import static org.junit.jupiter.api.Assertions.fail;
public class RefTest extends LanguageTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myExp", new MyExpression());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleOperatorTest.java b/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleOperatorTest.java
index 5c1fd78f4da..58446b1caa6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleOperatorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleOperatorTest.java
@@ -28,8 +28,8 @@ import static org.junit.jupiter.api.Assertions.fail;
public class SimpleOperatorTest extends LanguageTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("generator", new MyFileNameGenerator());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleParserPredicateTest.java b/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleParserPredicateTest.java
index 82b9c856a39..194e773d735 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleParserPredicateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleParserPredicateTest.java
@@ -257,8 +257,8 @@ public class SimpleParserPredicateTest extends ExchangeTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
List<String> list = new ArrayList<>();
list.add("foo");
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java b/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
index fdcf759ffd7..05eef9805d8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
@@ -67,8 +67,8 @@ public class SimpleTest extends LanguageTestSupport {
private static final String INDEX_OUT_OF_BOUNDS_ERROR_MSG = "Index 2 out of bounds for length 2";
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myAnimal", new Animal("Donkey", 17));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanOgnMethodWithXPathInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanOgnMethodWithXPathInjectionTest.java
index 883ffff661d..f2787053fd2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanOgnMethodWithXPathInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanOgnMethodWithXPathInjectionTest.java
@@ -67,8 +67,8 @@ public class BeanOgnMethodWithXPathInjectionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
answer.bind("myOtherBean", myOtherBean);
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListInterfaceAnnotationTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListInterfaceAnnotationTest.java
index 230411b0d3b..6d03658b541 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListInterfaceAnnotationTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListInterfaceAnnotationTest.java
@@ -27,8 +27,8 @@ public class BeanRecipientListInterfaceAnnotationTest extends BeanRecipientListT
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTest.java
index f9da8f3126c..33da9e364f2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTest.java
@@ -57,8 +57,8 @@ public class BeanRecipientListTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTimeoutTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTimeoutTest.java
index dd8d7f96f8c..9c72d02afc5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTimeoutTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanRecipientListTimeoutTest.java
@@ -54,8 +54,8 @@ public class BeanRecipientListTimeoutTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
answer.bind("myStrategy", new MyAggregationStrategy());
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanRouteTest.java
index e27ba19a6de..eba6b713819 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanRouteTest.java
@@ -68,8 +68,8 @@ public class BeanRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanSingletonTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanSingletonTest.java
index d6b67a7d90d..e083e7f4ec7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanSingletonTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanSingletonTest.java
@@ -46,7 +46,7 @@ public class BeanSingletonTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
context = createJndiContext();
context.bind("something", new MyBean());
registry = new DefaultRegistry(new JndiBeanRepository(context));
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
index 6f3c0021377..82d30b0b956 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
@@ -83,8 +83,8 @@ public class BeanWithExceptionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new ValidationBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionPreCompileTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionPreCompileTest.java
index 37139d752be..88269d153a1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionPreCompileTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionPreCompileTest.java
@@ -63,8 +63,8 @@ public class BeanWithXPathInjectionPreCompileTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionTest.java
index 95282d63640..f1a67655331 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/BeanWithXPathInjectionTest.java
@@ -63,8 +63,8 @@ public class BeanWithXPathInjectionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/CBRPredicateBeanThrowExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/CBRPredicateBeanThrowExceptionTest.java
index e99246bc6e6..6500e9a9650 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/CBRPredicateBeanThrowExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/CBRPredicateBeanThrowExceptionTest.java
@@ -34,8 +34,8 @@ public class CBRPredicateBeanThrowExceptionTest extends ContextTestSupport {
private static AtomicBoolean check2 = new AtomicBoolean();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("cbrBean", new MyCBRBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java
index 1f33e33a6fe..5f498f57cfb 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java
@@ -56,8 +56,8 @@ public class ClaimCheckTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("checkLuggage", new CheckLuggageBean());
jndi.bind("dataEnricher", new DataEnricherBean());
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ComposedMessageProcessorTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ComposedMessageProcessorTest.java
index f2c0e097b82..a342b317e6f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ComposedMessageProcessorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ComposedMessageProcessorTest.java
@@ -72,8 +72,8 @@ public class ComposedMessageProcessorTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("orderItemHelper", new OrderItemHelper());
jndi.bind("widgetInventory", new WidgetInventory());
jndi.bind("gadgetInventory", new GadgetInventory());
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/CustomConsumerExceptionHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/CustomConsumerExceptionHandlerTest.java
index c2d5c40e306..696f4e88d7c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/CustomConsumerExceptionHandlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/CustomConsumerExceptionHandlerTest.java
@@ -33,8 +33,8 @@ public class CustomConsumerExceptionHandlerTest extends ContextTestSupport {
private static final CountDownLatch LATCH = new CountDownLatch(1);
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myHandler", new MyExceptionHandler());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/CustomRefLoadBalanceTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/CustomRefLoadBalanceTest.java
index 7cb8ea584a7..2265a834521 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/CustomRefLoadBalanceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/CustomRefLoadBalanceTest.java
@@ -22,8 +22,8 @@ import org.apache.camel.spi.Registry;
public class CustomRefLoadBalanceTest extends CustomLoadBalanceTest {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBalancer", new MyLoadBalancer());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/DataFormatServiceCustomRefTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/DataFormatServiceCustomRefTest.java
index 862f0cb0dd7..abd1bb3628a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/DataFormatServiceCustomRefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/DataFormatServiceCustomRefTest.java
@@ -22,8 +22,8 @@ import org.apache.camel.spi.Registry;
public class DataFormatServiceCustomRefTest extends DataFormatServiceTest {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myCustomDataFormat", my);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelAlwaysHandledTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelAlwaysHandledTest.java
index d892f569b8c..e3690bdac5d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelAlwaysHandledTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelAlwaysHandledTest.java
@@ -32,8 +32,8 @@ public class DeadLetterChannelAlwaysHandledTest extends ContextTestSupport {
private static final AtomicBoolean CALLLED = new AtomicBoolean();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myHandler", new MyExceptionHandler());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelRestartFromBeginningTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelRestartFromBeginningTest.java
index 1e6df908f1c..21dbf8cca3e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelRestartFromBeginningTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelRestartFromBeginningTest.java
@@ -30,8 +30,8 @@ import org.junit.jupiter.api.Test;
public class DeadLetterChannelRestartFromBeginningTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("retryBean", new RetryBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/DefinitionPolicyPerProcessorTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/DefinitionPolicyPerProcessorTest.java
index 26481d28c1b..5e93095b627 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/DefinitionPolicyPerProcessorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/DefinitionPolicyPerProcessorTest.java
@@ -48,8 +48,8 @@ public class DefinitionPolicyPerProcessorTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyPolicy("foo"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/DetourTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/DetourTest.java
index de159afd435..a69b311c012 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/DetourTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/DetourTest.java
@@ -61,8 +61,8 @@ public class DetourTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
controlBean = new ControlBean();
jndi.bind("controlBean", controlBean);
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ErrorHandlerWrappedEachNodeTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ErrorHandlerWrappedEachNodeTest.java
index e6f7d8b85ba..55fdf14969c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ErrorHandlerWrappedEachNodeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ErrorHandlerWrappedEachNodeTest.java
@@ -66,8 +66,8 @@ public class ErrorHandlerWrappedEachNodeTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java
index b40a6d2e362..a4a4545f47b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java
@@ -56,8 +56,8 @@ public class MethodFilterTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/MethodFilterVariableTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/MethodFilterVariableTest.java
index 15a510d7c3a..c772caf3645 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/MethodFilterVariableTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/MethodFilterVariableTest.java
@@ -58,8 +58,8 @@ public class MethodFilterVariableTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", new MyBean());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java
index 63da66c006b..dadb86ca7f7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java
@@ -46,8 +46,8 @@ public class NormalizerTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("normalizer", new MyNormalizer());
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/PolicyPerProcessorTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/PolicyPerProcessorTest.java
index 991a3108586..8cc9324931d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/PolicyPerProcessorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/PolicyPerProcessorTest.java
@@ -53,8 +53,8 @@ public class PolicyPerProcessorTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyPolicy("foo"));
jndi.bind("bar", new MyPolicy("bar"));
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/PolicyPerRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/PolicyPerRouteTest.java
index e82d1db46c8..aaecd648a4d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/PolicyPerRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/PolicyPerRouteTest.java
@@ -51,8 +51,8 @@ public class PolicyPerRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyPolicy("foo"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanOnPrepareTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanOnPrepareTest.java
index 212c383a38c..44b618d2bba 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanOnPrepareTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanOnPrepareTest.java
@@ -31,8 +31,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class RecipientListBeanOnPrepareTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myPrepare", new AnimalDeepClonePrepare());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanTest.java
index 08ad7b5cf56..3b0f166e3a5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class RecipientListBeanTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListFineGrainedErrorHandlingTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListFineGrainedErrorHandlingTest.java
index a078fffd7ae..b6a7b53755e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListFineGrainedErrorHandlingTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListFineGrainedErrorHandlingTest.java
@@ -34,8 +34,8 @@ public class RecipientListFineGrainedErrorHandlingTest extends ContextTestSuppor
private static int tries;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("fail", new MyFailBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListParallelFineGrainedErrorHandlingTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListParallelFineGrainedErrorHandlingTest.java
index a39f7335894..259c7000992 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListParallelFineGrainedErrorHandlingTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListParallelFineGrainedErrorHandlingTest.java
@@ -32,8 +32,8 @@ public class RecipientListParallelFineGrainedErrorHandlingTest extends ContextTe
private static int counter;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("fail", new MyFailBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListReturnValueTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListReturnValueTest.java
index ffc5866efb9..8ec97b7c279 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListReturnValueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/RecipientListReturnValueTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class RecipientListReturnValueTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RoutePoliciesRefTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/RoutePoliciesRefTest.java
index 547e2c0caed..7ac0cc547f9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RoutePoliciesRefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/RoutePoliciesRefTest.java
@@ -31,8 +31,8 @@ public class RoutePoliciesRefTest extends ContextTestSupport {
private final MyCustomRoutePolicy policyB = new MyCustomRoutePolicy("B");
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("policy-a", policyA);
jndi.bind("policy-b", policyB);
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SimulatorTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SimulatorTest.java
index c6be2dc2060..50bae91103e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SimulatorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SimulatorTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class SimulatorTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", new MyBean("foo"));
answer.bind("bar", new MyBean("bar"));
return answer;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java
index db813623eac..4d3eee0921c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java
@@ -48,8 +48,8 @@ public class SplitAggregateInOutTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("MyOrderService", new MyOrderService());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitRefCustomExpressionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitRefCustomExpressionTest.java
index 11f4a33271f..8d9b5934944 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitRefCustomExpressionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitRefCustomExpressionTest.java
@@ -31,8 +31,8 @@ import org.junit.jupiter.api.Test;
public class SplitRefCustomExpressionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myCustomExpression", new MyCustomExpression());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterMethodCallTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterMethodCallTest.java
index e33d297599f..882523d5bda 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterMethodCallTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterMethodCallTest.java
@@ -38,8 +38,8 @@ public class SplitterMethodCallTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("splitterBean", new SplitWordsBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterPojoTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterPojoTest.java
index 71717cef6c9..a8d744c9495 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterPojoTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterPojoTest.java
@@ -37,8 +37,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class SplitterPojoTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("mySplitterBean", new MySplitterBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/StreamCachingSpoolDirectoryQuarkusTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/StreamCachingSpoolDirectoryQuarkusTest.java
index 2621b238993..cf45d5797ab 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/StreamCachingSpoolDirectoryQuarkusTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/StreamCachingSpoolDirectoryQuarkusTest.java
@@ -53,8 +53,7 @@ public class StreamCachingSpoolDirectoryQuarkusTest extends ContextTestSupport {
protected CamelContext createCamelContext() throws Exception {
DefaultCamelContext context = new MyCamelContext(false);
context.disableJMX();
- context.getCamelContextExtension().setRegistry(createRegistry());
- context.setLoadTypeConverters(isLoadTypeConverters());
+ context.getCamelContextExtension().setRegistry(createCamelRegistry());
return context;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionFinallyTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionFinallyTest.java
index 9da8eb03063..be0c71b33ca 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionFinallyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionFinallyTest.java
@@ -41,8 +41,8 @@ public class TryCatchCaughtExceptionFinallyTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", this);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionTest.java
index 30c90980ff8..f0b8fa5daca 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionTest.java
@@ -41,8 +41,8 @@ public class TryCatchCaughtExceptionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", this);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionTwoTimesTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionTwoTimesTest.java
index df13f663816..4dfd2589934 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionTwoTimesTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/TryCatchCaughtExceptionTwoTimesTest.java
@@ -43,8 +43,8 @@ public class TryCatchCaughtExceptionTwoTimesTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", this);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/TryFinallyCaughtExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/TryFinallyCaughtExceptionTest.java
index 2ef7bffd79f..06425485fa7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/TryFinallyCaughtExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/TryFinallyCaughtExceptionTest.java
@@ -56,8 +56,8 @@ public class TryFinallyCaughtExceptionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", this);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkProducerTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkProducerTest.java
index 47bf2609cc8..fef8c7b23af 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkProducerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkProducerTest.java
@@ -37,7 +37,7 @@ public class UnitOfWorkProducerTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
events.add(event);
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapBeanAsProcessorTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapBeanAsProcessorTest.java
index 6fad8ece24a..dbac642b0b1 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapBeanAsProcessorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapBeanAsProcessorTest.java
@@ -39,8 +39,8 @@ public class WireTapBeanAsProcessorTest extends ContextTestSupport {
private MockEndpoint result;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("tap", myBean);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapOnPrepareRefTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapOnPrepareRefTest.java
index 7e8a369d6a5..12ac2f583a9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapOnPrepareRefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapOnPrepareRefTest.java
@@ -25,8 +25,8 @@ import org.apache.camel.spi.Registry;
public class WireTapOnPrepareRefTest extends WireTapOnPrepareTest {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("deepClone", new AnimalDeepClonePrepare());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapShutdownBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapShutdownBeanTest.java
index 4f17c9acdc5..b107535b80d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapShutdownBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapShutdownBeanTest.java
@@ -62,8 +62,8 @@ public class WireTapShutdownBeanTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("tap", new MyTapBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapShutdownRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapShutdownRouteTest.java
index 8fb1f93d07c..e103876db2f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapShutdownRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapShutdownRouteTest.java
@@ -62,8 +62,8 @@ public class WireTapShutdownRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("tap", new MyTapBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapVoidBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapVoidBeanTest.java
index 58c823335d8..04c03fb8409 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapVoidBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapVoidBeanTest.java
@@ -51,8 +51,8 @@ public class WireTapVoidBeanTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("tap", new MyTapBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AbstractDistributedTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AbstractDistributedTest.java
index 8894ab9a718..ce7c6f06b64 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AbstractDistributedTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AbstractDistributedTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.processor.aggregator;
import org.apache.camel.CamelContext;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.RoutesBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.impl.DefaultCamelContext;
import org.junit.jupiter.api.AfterEach;
@@ -59,7 +59,7 @@ public abstract class AbstractDistributedTest extends ContextTestSupport {
return context2.getEndpoint(uri, MockEndpoint.class);
}
- protected RouteBuilder createRouteBuilder2() throws Exception {
+ protected RoutesBuilder createRouteBuilder2() throws Exception {
return createRouteBuilder();
}
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateForceCompletionOnStopTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateForceCompletionOnStopTest.java
index eed9b7c6891..878fad4b026 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateForceCompletionOnStopTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateForceCompletionOnStopTest.java
@@ -104,8 +104,8 @@ public class AggregateForceCompletionOnStopTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myCompletionProcessor", new MyCompletionProcessor());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterRefMethodNameTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterRefMethodNameTest.java
index b026f0a8d1c..ac46f6b66cd 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterRefMethodNameTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterRefMethodNameTest.java
@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
public class AggregationStrategyBeanAdapterRefMethodNameTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myAppender", new AggregationStrategyBeanAdapterRefMethodNameTest.MyBodyAppender());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterRefTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterRefTest.java
index a7accc101b1..a35c5134799 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterRefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyBeanAdapterRefTest.java
@@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
public class AggregationStrategyBeanAdapterRefTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myAppender", new AggregationStrategyBeanAdapterTest.MyBodyAppender());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierSendingTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierSendingTest.java
index 56c2a00af76..e85fd094b8b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierSendingTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierSendingTest.java
@@ -59,7 +59,7 @@ public class AsyncEndpointEventNotifierSendingTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
events.add(event);
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
index bbbb3472cd8..e804df36664 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointEventNotifierTest.java
@@ -56,7 +56,7 @@ public class AsyncEndpointEventNotifierTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
try {
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointPolicyTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointPolicyTest.java
index 7c3912d4b62..56afb6389ce 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointPolicyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointPolicyTest.java
@@ -43,8 +43,8 @@ public class AsyncEndpointPolicyTest extends ContextTestSupport {
private static String afterThreadName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyPolicy("foo"));
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBean3Test.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBean3Test.java
index e2de46205dc..06bfdb7b0a9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBean3Test.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBean3Test.java
@@ -33,8 +33,8 @@ public class AsyncEndpointRecipientListBean3Test extends ContextTestSupport {
private static String afterThreadName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyRecipientBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBean4Test.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBean4Test.java
index 02b49a020e6..29073ca7816 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBean4Test.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBean4Test.java
@@ -33,8 +33,8 @@ public class AsyncEndpointRecipientListBean4Test extends ContextTestSupport {
private static String afterThreadName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyRecipientBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBeanTest.java
index 93c1d4facfc..16c085b1809 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListBeanTest.java
@@ -33,8 +33,8 @@ public class AsyncEndpointRecipientListBeanTest extends ContextTestSupport {
private static String afterThreadName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyRecipientBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListFineGrainedErrorHandlingTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListFineGrainedErrorHandlingTest.java
index db7c16646c1..5c19e611e7f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListFineGrainedErrorHandlingTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRecipientListFineGrainedErrorHandlingTest.java
@@ -30,8 +30,8 @@ public class AsyncEndpointRecipientListFineGrainedErrorHandlingTest extends Cont
private static int counter;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("fail", new MyFailBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBean2Test.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBean2Test.java
index 72adc8a05fb..d6196389e18 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBean2Test.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBean2Test.java
@@ -27,8 +27,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class AsyncEndpointRoutingSlipBean2Test extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyRoutingSlipBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBean3Test.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBean3Test.java
index cad5374d81e..68f09327d9b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBean3Test.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBean3Test.java
@@ -33,8 +33,8 @@ public class AsyncEndpointRoutingSlipBean3Test extends ContextTestSupport {
private static String afterThreadName;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyRoutingSlipBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBeanNonBlockingTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBeanNonBlockingTest.java
index 929be55f2f2..d12ed763ff8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBeanNonBlockingTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBeanNonBlockingTest.java
@@ -43,8 +43,8 @@ public class AsyncEndpointRoutingSlipBeanNonBlockingTest extends ContextTestSupp
private Exchange innerExchange;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyRoutingSlipBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBeanTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBeanTest.java
index a5f9b98ee0f..10df3ba82f7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBeanTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointRoutingSlipBeanTest.java
@@ -27,8 +27,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class AsyncEndpointRoutingSlipBeanTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", new MyRoutingSlipBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncProcessorAwaitManagerInterruptWithRedeliveryTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncProcessorAwaitManagerInterruptWithRedeliveryTest.java
index cdb2940d721..8dec42547aa 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncProcessorAwaitManagerInterruptWithRedeliveryTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncProcessorAwaitManagerInterruptWithRedeliveryTest.java
@@ -106,8 +106,8 @@ public class AsyncProcessorAwaitManagerInterruptWithRedeliveryTest extends Conte
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", bean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherAggregateStreamingTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherAggregateStreamingTest.java
index d6f0e701c90..23858a9494f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherAggregateStreamingTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherAggregateStreamingTest.java
@@ -55,8 +55,8 @@ public class EnricherAggregateStreamingTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("b1", new MyProcessor()); // for synchronous call
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherBiFunctionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherBiFunctionTest.java
index 7a4192a6832..8a63e4ef116 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherBiFunctionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherBiFunctionTest.java
@@ -37,8 +37,8 @@ public class EnricherBiFunctionTest extends ContextTestSupport {
= (Exchange e1, Exchange e2) -> e1.getMessage().getBody(String.class) + "+" + e2.getMessage().getBody(String.class);
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("cool", cool);
jndi.bind("agg", myAgg);
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefBeanClassTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefBeanClassTest.java
index ba2f37c2712..8c5bc79d7e7 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefBeanClassTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefBeanClassTest.java
@@ -32,8 +32,8 @@ public class EnricherRefBeanClassTest extends ContextTestSupport {
private MockEndpoint cool = new MockEndpoint("mock:cool", new MockComponent(context));
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("cool", cool);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefBeanTypeTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefBeanTypeTest.java
index 82f0399e81a..b9f88a74e52 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefBeanTypeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefBeanTypeTest.java
@@ -33,8 +33,8 @@ public class EnricherRefBeanTypeTest extends ContextTestSupport {
private MockEndpoint cool = new MockEndpoint("mock:cool", new MockComponent(context));
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("cool", cool);
jndi.bind("latest", new UseLatestAggregationStrategy());
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefTest.java
index 0c29c3d7bcb..b81efed367d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherRefTest.java
@@ -33,8 +33,8 @@ public class EnricherRefTest extends ContextTestSupport {
private MockEndpoint cool = new MockEndpoint("mock:cool", new MockComponent(context));
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("cool", cool);
jndi.bind("agg", new UseLatestAggregationStrategy());
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnrichBridgeErrorHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnrichBridgeErrorHandlerTest.java
index 520536e2fc9..b9625e10e4d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnrichBridgeErrorHandlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnrichBridgeErrorHandlerTest.java
@@ -35,8 +35,8 @@ public class PollEnrichBridgeErrorHandlerTest extends ContextTestSupport {
private MyPollingStrategy myPoll = new MyPollingStrategy();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myPoll", myPoll);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java
index 83555f3c59b..e14d0c42122 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java
@@ -33,8 +33,8 @@ public class PollEnricherRefTest extends ContextTestSupport {
private SedaEndpoint cool = new SedaEndpoint();
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("cool", cool);
jndi.bind("agg", new UseLatestAggregationStrategy());
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java
index 378cb59ba05..4a53cda0b71 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java
@@ -53,8 +53,8 @@ public class CustomExceptionPolicyStrategyTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("reverse-strategy", ExceptionPolicyStrategy.class, new DefaultExceptionPolicyStrategy() {
@Override
public Iterable<Throwable> createExceptionIterable(Throwable exception) {
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/ContextScopedOnExceptionLoadBalancerStopRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/ContextScopedOnExceptionLoadBalancerStopRouteTest.java
index 6450ba6e9db..c31bf9086d6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/ContextScopedOnExceptionLoadBalancerStopRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/ContextScopedOnExceptionLoadBalancerStopRouteTest.java
@@ -77,8 +77,10 @@ public class ContextScopedOnExceptionLoadBalancerStopRouteTest extends ContextTe
template.sendBody("direct:start", "Kaboom");
template.sendBody("direct:start", "World");
- // give time for route to stop
- await().atMost(1, TimeUnit.SECONDS).untilAsserted(
+ // give time for route to stop.
+ // this was originally 1 second, but the route does not always
+ // shut down that fast, so bumped it up for some cushion.
+ await().atMost(3, TimeUnit.SECONDS).untilAsserted(
() -> assertEquals(ServiceStatus.Stopped, context.getRouteController().getRouteStatus("errorRoute")));
template.sendBody("direct:start", "Kaboom");
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerExchangeFormatterRefTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerExchangeFormatterRefTest.java
index 90c06232e59..9e6a2edd792 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerExchangeFormatterRefTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerExchangeFormatterRefTest.java
@@ -32,8 +32,8 @@ public class DefaultErrorHandlerExchangeFormatterRefTest extends ContextTestSupp
private static int invoked;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myExchangeFormatter", new MyExchangeFormatter());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerOnExceptionOccurredProcessorTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerOnExceptionOccurredProcessorTest.java
index 457e64e4b0f..99b15dfabd8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerOnExceptionOccurredProcessorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerOnExceptionOccurredProcessorTest.java
@@ -29,8 +29,8 @@ import static org.junit.jupiter.api.Assertions.fail;
public class DefaultErrorHandlerOnExceptionOccurredProcessorTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myProcessor", new MyProcessor());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerRetryWhileTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerRetryWhileTest.java
index 151e69e71c2..7ac003241e2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerRetryWhileTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerRetryWhileTest.java
@@ -33,8 +33,8 @@ public class DefaultErrorHandlerRetryWhileTest extends ContextTestSupport {
private static int invoked;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myRetryHandler", new MyRetryBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionComplexRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionComplexRouteTest.java
index 5a2f285672f..8fbeb9b2b58 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionComplexRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionComplexRouteTest.java
@@ -98,8 +98,8 @@ public class OnExceptionComplexRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myServiceBean", myServiceBean);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceTest.java
index 281b785b330..36c3d16a635 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceTest.java
@@ -83,8 +83,8 @@ public class OnExceptionFromChoiceTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myServiceBean", myServiceBean);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceUseOriginalBodyTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceUseOriginalBodyTest.java
index 13e4efb89db..22ee0d5a863 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceUseOriginalBodyTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceUseOriginalBodyTest.java
@@ -83,8 +83,8 @@ public class OnExceptionFromChoiceUseOriginalBodyTest extends ContextTestSupport
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myServiceBean", myServiceBean);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionOccurredProcessorOnExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionOccurredProcessorOnExceptionTest.java
index 34f623ce928..005b8424d8d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionOccurredProcessorOnExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionOccurredProcessorOnExceptionTest.java
@@ -28,8 +28,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class OnExceptionOccurredProcessorOnExceptionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myProcessor", new MyProcessor());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionOccurredProcessorTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionOccurredProcessorTest.java
index c2b5cdad79e..c3c146c364a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionOccurredProcessorTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionOccurredProcessorTest.java
@@ -28,8 +28,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class OnExceptionOccurredProcessorTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myProcessor", new MyProcessor());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
index db9d87626f9..5919c3ee8b6 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
@@ -37,8 +37,8 @@ public class OnExceptionRetryUntilTest extends ContextTestSupport {
private static int invoked;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myRetryHandler", new MyRetryBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilWithDefaultErrorHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilWithDefaultErrorHandlerTest.java
index 1571ff74f14..a1ab9bbfc45 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilWithDefaultErrorHandlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilWithDefaultErrorHandlerTest.java
@@ -37,8 +37,8 @@ public class OnExceptionRetryUntilWithDefaultErrorHandlerTest extends ContextTes
private static int invoked;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myRetryHandler", new MyRetryBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRouteTest.java
index 9edbb755db7..b894bd2a02b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRouteTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRouteTest.java
@@ -109,8 +109,8 @@ public class OnExceptionRouteTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myOwnHandler", myOwnHandlerBean);
jndi.bind("myServiceBean", myServiceBean);
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRouteWithDefaultErrorHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRouteWithDefaultErrorHandlerTest.java
index 12cb970e336..e10ec41545b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRouteWithDefaultErrorHandlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRouteWithDefaultErrorHandlerTest.java
@@ -93,8 +93,8 @@ public class OnExceptionRouteWithDefaultErrorHandlerTest extends ContextTestSupp
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myOwnHandler", myOwnHandlerBean);
jndi.bind("myServiceBean", myServiceBean);
return jndi;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/routingslip/RoutingSlipDataModificationTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/routingslip/RoutingSlipDataModificationTest.java
index dafc42c9f1d..9d5a11320ad 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/routingslip/RoutingSlipDataModificationTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/routingslip/RoutingSlipDataModificationTest.java
@@ -58,8 +58,8 @@ public class RoutingSlipDataModificationTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/routingslip/RoutingSlipWithExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/routingslip/RoutingSlipWithExceptionTest.java
index 8c58ad09244..ce59c6043ec 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/routingslip/RoutingSlipWithExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/routingslip/RoutingSlipWithExceptionTest.java
@@ -139,8 +139,8 @@ public class RoutingSlipWithExceptionTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBean", myBean);
return answer;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/throttle/concurrent/ThrottlerMethodCallTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/throttle/concurrent/ThrottlerMethodCallTest.java
index e7c719b501e..af06b3c857e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/throttle/concurrent/ThrottlerMethodCallTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/throttle/concurrent/ThrottlerMethodCallTest.java
@@ -42,8 +42,8 @@ public class ThrottlerMethodCallTest extends ContextTestSupport {
private ExecutorService executor;
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myBean", this);
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/validator/BeanValidatorInputValidateTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/validator/BeanValidatorInputValidateTest.java
index dae0040bfb4..dfccdb7b665 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/validator/BeanValidatorInputValidateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/validator/BeanValidatorInputValidateTest.java
@@ -60,8 +60,8 @@ public class BeanValidatorInputValidateTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("testValidator", new TestValidator());
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/validator/BeanValidatorOutputValidateTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/validator/BeanValidatorOutputValidateTest.java
index d548975d1c6..5ace9515133 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/validator/BeanValidatorOutputValidateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/validator/BeanValidatorOutputValidateTest.java
@@ -64,8 +64,8 @@ public class BeanValidatorOutputValidateTest extends ContextTestSupport {
}
@Override
- protected Registry createRegistry() throws Exception {
- Registry registry = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry registry = super.createCamelRegistry();
registry.bind("testValidator", new TestValidator());
diff --git a/core/camel-core/src/test/java/org/apache/camel/support/jndi/JndiCamelSingletonInitialContextFactoryTest.java b/core/camel-core/src/test/java/org/apache/camel/support/jndi/JndiCamelSingletonInitialContextFactoryTest.java
index 80bb6cb2fef..535a880219e 100644
--- a/core/camel-core/src/test/java/org/apache/camel/support/jndi/JndiCamelSingletonInitialContextFactoryTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/support/jndi/JndiCamelSingletonInitialContextFactoryTest.java
@@ -48,7 +48,7 @@ public class JndiCamelSingletonInitialContextFactoryTest extends ContextTestSupp
}
@Override
- protected Registry createRegistry() throws Exception {
+ protected Registry createCamelRegistry() throws Exception {
Context context = new InitialContext(env);
context.bind("jdbc/myDataSource", FAKE);
return new DefaultRegistry(new JndiBeanRepository(context));
diff --git a/core/camel-core/src/test/java/org/apache/camel/util/CamelContextHelperTest.java b/core/camel-core/src/test/java/org/apache/camel/util/CamelContextHelperTest.java
index 74c1028feb2..5147fd0563d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/util/CamelContextHelperTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/util/CamelContextHelperTest.java
@@ -31,8 +31,8 @@ import static org.junit.jupiter.api.Assertions.*;
public class CamelContextHelperTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyFooBean());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlDanishCharactersTest.java b/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlDanishCharactersTest.java
index 20ac4e8bf8c..0e38d79976f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlDanishCharactersTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlDanishCharactersTest.java
@@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class DumpModelAsXmlDanishCharactersTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myCoolBean", new MyBarSingleton());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRouteExpressionTest.java b/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRouteExpressionTest.java
index 127c2b4e808..18b86a8c551 100644
--- a/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRouteExpressionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRouteExpressionTest.java
@@ -33,8 +33,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class DumpModelAsXmlRouteExpressionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myCoolBean", new MyBarSingleton());
return jndi;
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRoutePredicateTest.java b/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRoutePredicateTest.java
index 37b99181a9f..68b0107204c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRoutePredicateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRoutePredicateTest.java
@@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class DumpModelAsXmlRoutePredicateTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myCoolBean", new MyBarSingleton());
return jndi;
}
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/JmxNotificationEventNotifierTest.java b/core/camel-management/src/test/java/org/apache/camel/management/JmxNotificationEventNotifierTest.java
index 2bdd36a1807..446316fbf9e 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/JmxNotificationEventNotifierTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/JmxNotificationEventNotifierTest.java
@@ -47,7 +47,7 @@ public class JmxNotificationEventNotifierTest extends ManagementTestSupport {
notifier.setIgnoreRouteEvents(true);
notifier.setIgnoreServiceEvents(true);
- CamelContext context = new DefaultCamelContext(createRegistry());
+ CamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(notifier);
// END SNIPPET: e1
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/LoggingEventNotifierTest.java b/core/camel-management/src/test/java/org/apache/camel/management/LoggingEventNotifierTest.java
index 0810063c028..39ecc9241b6 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/LoggingEventNotifierTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/LoggingEventNotifierTest.java
@@ -42,7 +42,7 @@ public class LoggingEventNotifierTest extends ContextTestSupport {
notifier.setIgnoreRouteEvents(true);
notifier.setIgnoreServiceEvents(true);
- CamelContext context = new DefaultCamelContext(createRegistry());
+ CamelContext context = new DefaultCamelContext(createCamelRegistry());
context.getManagementStrategy().addEventNotifier(notifier);
return context;
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagedCustomLoadBalancerTest.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagedCustomLoadBalancerTest.java
index ddc7dc08e90..59420215473 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagedCustomLoadBalancerTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagedCustomLoadBalancerTest.java
@@ -36,8 +36,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class ManagedCustomLoadBalancerTest extends ManagementTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("myBalancer", new MyLoadBalancer());
return answer;
}
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagedProcessTest.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagedProcessTest.java
index 7faf2d4656e..f5dcbbb809c 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagedProcessTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagedProcessTest.java
@@ -34,8 +34,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class ManagedProcessTest extends ManagementTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry answer = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry answer = super.createCamelRegistry();
answer.bind("foo", new MyDummyProcessor());
return answer;
}
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/PublishEventNotifierTest.java b/core/camel-management/src/test/java/org/apache/camel/management/PublishEventNotifierTest.java
index 3decdb7043d..fa2df100dea 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/PublishEventNotifierTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/PublishEventNotifierTest.java
@@ -36,7 +36,7 @@ public class PublishEventNotifierTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- CamelContext context = new DefaultCamelContext(createRegistry());
+ CamelContext context = new DefaultCamelContext(createCamelRegistry());
PublishEventNotifier notifier = new PublishEventNotifier();
notifier.setCamelContext(context);
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/PublishEventNotifierToRouteTest.java b/core/camel-management/src/test/java/org/apache/camel/management/PublishEventNotifierToRouteTest.java
index 5f072d42fec..c9e76519a48 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/PublishEventNotifierToRouteTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/PublishEventNotifierToRouteTest.java
@@ -36,7 +36,7 @@ public class PublishEventNotifierToRouteTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- CamelContext context = new DefaultCamelContext(createRegistry());
+ CamelContext context = new DefaultCamelContext(createCamelRegistry());
PublishEventNotifier notifier = new PublishEventNotifier();
notifier.setCamelContext(context);
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/RemoveEventNotifierTest.java b/core/camel-management/src/test/java/org/apache/camel/management/RemoveEventNotifierTest.java
index 471626215a4..acd5019af7d 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/RemoveEventNotifierTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/RemoveEventNotifierTest.java
@@ -48,7 +48,7 @@ public class RemoveEventNotifierTest extends ContextTestSupport {
@Override
protected CamelContext createCamelContext() throws Exception {
- DefaultCamelContext context = new DefaultCamelContext(createRegistry());
+ DefaultCamelContext context = new DefaultCamelContext(createCamelRegistry());
notifier = new EventNotifierSupport() {
public void notify(CamelEvent event) throws Exception {
diff --git a/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRestFromXmlTest.java b/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRestFromXmlTest.java
index 7f044047ba1..dfb2aab39ca 100644
--- a/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRestFromXmlTest.java
+++ b/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRestFromXmlTest.java
@@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class LoadRestFromXmlTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
jndi.bind("dummy-rest-api", new DummyRestProcessorFactory());
return jndi;
diff --git a/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRouteFromXmlWithOnExceptionTest.java b/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRouteFromXmlWithOnExceptionTest.java
index 2942d20f6a4..5756fb2de99 100644
--- a/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRouteFromXmlWithOnExceptionTest.java
+++ b/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRouteFromXmlWithOnExceptionTest.java
@@ -30,8 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class LoadRouteFromXmlWithOnExceptionTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("myProcessor", new MyProcessor());
return jndi;
}
diff --git a/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRouteFromXmlWithPolicyTest.java b/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRouteFromXmlWithPolicyTest.java
index f23af9faf8e..63cd100fbcb 100644
--- a/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRouteFromXmlWithPolicyTest.java
+++ b/dsl/camel-xml-jaxb-dsl-test/definition/src/test/java/org/apache/camel/dsl/xml/jaxb/definition/LoadRouteFromXmlWithPolicyTest.java
@@ -33,8 +33,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class LoadRouteFromXmlWithPolicyTest extends ContextTestSupport {
@Override
- protected Registry createRegistry() throws Exception {
- Registry jndi = super.createRegistry();
+ protected Registry createCamelRegistry() throws Exception {
+ Registry jndi = super.createCamelRegistry();
jndi.bind("foo", new MyPolicy("foo"));
return jndi;
}