Closed andrii-kovalenko-ct closed 6 years ago
something about this class that I noticed (not related to this pr), why is the tenantNameToWebhookCompletionStage instance variable a CompletableFuture<Map<String, Webhook>> and not just a CompletableFuture<Set
> since I see an implementation for such a composite object already?
@heshamMassoud
i think because of getWebhookCompletionStageByTenantName()
function.
But what @lojzatran could you say?
Mock heavy redundant executions in the integration tests:
split
CtpConfigValidator
toCtpConfigStartupConfiguration
andCtpStartupValidator
bean with default implementationCtpStartupValidatorImpl
. This allows use to substitute default validation in the tests byEmptyCtpConfigStartupValidatorTestImpl
.substitute
WebhookContainer
bean in the tests byEmptyWebhookContainerTestImpl
. In the integration tests this bean is not created at all using Spring profiles feature and activatingtestIntegrationProfile
for the integration testsintroduce
@PrimaryForTest
annotation to emphasize a bean(config) is replacing default bean(config) in the tests