summaryrefslogtreecommitdiffstats
path: root/aai-core/src/test/java
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-01-10 11:59:21 +0100
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-01-10 13:08:23 +0100
commit60eea4e2fdf10204147a22e78a165ed087fddbef (patch)
tree10b86e2c79b49a33b63a2f322617cf86ee3fc5c8 /aai-core/src/test/java
parentd21a7599963ae8e094eecd62cb80ed1d83d6d767 (diff)
Ensure HttpEntry bean is request scoped in aai-common
- change beans to request scoped since the transaction handling inside it is not thread-safe - bean injection in jersey is "request" scoped by default, but in a spring web context it is "prototype" - in the prototype scope, multiple threads could access the same HttpEntry Issue-ID: AAI-3723 Change-Id: I083e3b06cdbe4491f22746033cdcc80aa48a2d1b Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-core/src/test/java')
-rw-r--r--aai-core/src/test/java/org/onap/aai/AAISetup.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/AAISetup.java b/aai-core/src/test/java/org/onap/aai/AAISetup.java
index 72d8273a..a44226c8 100644
--- a/aai-core/src/test/java/org/onap/aai/AAISetup.java
+++ b/aai-core/src/test/java/org/onap/aai/AAISetup.java
@@ -43,7 +43,9 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
+import org.springframework.test.context.web.WebAppConfiguration;
+@WebAppConfiguration
@ContextConfiguration(
classes = {ConfigConfiguration.class, AAIConfigTranslator.class, EdgeIngestor.class, EdgeSerializer.class,
NodeIngestor.class, SpringContextAware.class, IntrospectionConfig.class, RestBeanConfig.class,