Skip to content

Commit

Permalink
cleanup config files from remnants of signal-enrichment config
Browse files Browse the repository at this point in the history
Signed-off-by: Yannic Klem <yannic.klem@bosch.io>
  • Loading branch information
Yannic92 committed Jul 12, 2022
1 parent 26dc892 commit 771dc71
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import org.junit.Rule;
import org.mockito.Mockito;

import com.typesafe.config.ConfigFactory;
import com.typesafe.config.ConfigValueFactory;

import akka.actor.ActorRef;
Expand Down Expand Up @@ -167,10 +168,10 @@ void resetActorSystemWithCachingSignalEnrichmentProvider() {
TestKit.shutdownActorSystem(actorSystem);
actorSystem = ActorSystem.create("AkkaTestSystemWithCachingSignalEnrichmentProvider",
TestConstants.CONFIG
.withValue("ditto.connectivity.signal-enrichment.provider",
ConfigValueFactory.fromAnyRef(
DefaultConnectivitySignalEnrichmentProvider.class.getCanonicalName())
)
.withValue("ditto.extensions.signal-enrichment-provider.extension-class",
ConfigValueFactory.fromAnyRef(DefaultConnectivitySignalEnrichmentProvider.class.getCanonicalName()))
.withValue("ditto.extensions.signal-enrichment-provider.extension-config.cache.enabled",
ConfigValueFactory.fromAnyRef(true))
);
final TestProbe probe = TestProbe.apply(actorSystem);
MockCommandForwarder.create(actorSystem, probe.ref());
Expand Down
23 changes: 7 additions & 16 deletions connectivity/service/src/test/resources/test.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ ditto {
extensions {
connection-priority-provider-factory = org.eclipse.ditto.connectivity.service.messaging.persistence.UsageBasedPriorityProviderFactory
client-actor-props-factory = org.eclipse.ditto.connectivity.service.messaging.DefaultClientActorPropsFactory
signal-enrichment-provider {
extension-class = org.eclipse.ditto.connectivity.service.mapping.DefaultConnectivitySignalEnrichmentProvider
extension-config = {
cache.enabled = false
ask-timeout = 10s
}
}
}
mapping-strategy.implementation = "org.eclipse.ditto.connectivity.api.ConnectivityMappingStrategies"
pre-enforcers = [
"org.eclipse.ditto.policies.enforcement.pre.CommandWithOptionalEntityPreEnforcer",
"org.eclipse.ditto.policies.enforcement.pre.HeaderSetterPreEnforcer"
]

signal-enrichment = {
caching-signal-enrichment-facade.provider = org.eclipse.ditto.internal.models.signalenrichment.DittoCachingSignalEnrichmentFacadeProvider
}

ddata {
subscription-write-consistency = "local"
subscription-delay = "0s"
Expand Down Expand Up @@ -211,18 +214,6 @@ ditto {
}
}

signal-enrichment {
provider = "org.eclipse.ditto.connectivity.service.mapping.ConnectivityByRoundTripSignalEnrichmentProvider"
provider-config {
ask-timeout = 2s
// configure cache here in case signal enrichment provider gets swapped to the caching implementation
cache {
maximum-size = 1000
expire-after-create = 2m
}
}
}

persistence-ping {
# initial delay for reconnecting the connections after the ReconnectActor has been started.
initial-delay = 0s
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions gateway/service/src/test/resources/streaming-test.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ streaming {

search-idle-timeout = 7h

signal-enrichment {
caching-enabled = false
ask-timeout = 20s

cache {
maximum-size = 20000
expire-after-create = 2m
}
}

acknowledgement {
forwarder-fallback-timeout = 65s
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import com.typesafe.config.ConfigFactory;

import akka.actor.ActorSelection;
import akka.actor.ActorSystem;
import akka.testkit.javadsl.TestKit;

/**
Expand Down Expand Up @@ -78,11 +77,11 @@ protected SignalEnrichmentFacade createSignalEnrichmentFacadeUnderTest(final Tes
final ActorSelection commandHandler = ActorSelection.apply(kit.getRef(), "");
final ByRoundTripSignalEnrichmentFacade cacheLoaderFacade =
ByRoundTripSignalEnrichmentFacade.of(commandHandler, Duration.ofSeconds(10L));
final var actorSystem =
ActorSystem.create(getClass().getSimpleName(), ConfigFactory.load("signal-enrichment-test.conf"));
final var cachingSignalEnrichmentFacadeProvider = CachingSignalEnrichmentFacadeProvider.get(actorSystem);
return cachingSignalEnrichmentFacadeProvider.getSignalEnrichmentFacade(actorSystem, cacheLoaderFacade, cacheConfig,
kit.getSystem().getDispatcher(), "test");
return DittoCachingSignalEnrichmentFacade.newInstance(
cacheLoaderFacade,
cacheConfig,
kit.getSystem().getDispatcher(),
"test");
}

@Override
Expand Down

This file was deleted.

0 comments on commit 771dc71

Please sign in to comment.