aboutsummaryrefslogtreecommitdiffstats
path: root/aai-core/src/test
AgeCommit message (Collapse)AuthorFilesLines
4 daysAdd resiliency test for the GraphCheckerHEADmasterFiete Ostkamp5-2/+226
- introduce IntegrationTest class for Junit 5 based tests that use the spring context - add resiliency test to test GraphChecker behaviour for interrupted network connections to cassandra - leverage testcontainers to run against a cassandra container and toxiproxy Issue-ID: AAI-4070 Change-Id: I2485b5240950ded6201942459f6fcdb4971e43d9 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
10 daysMove GraphChecker to aai-commonFiete Ostkamp3-37/+72
- define GraphCheck class that tests connection to storage backend - disable caching for the db transaction to make sure that the real connection is tested - define GraphConfig class that defines a Graph bean. This is an alternative to the AAIGraph class Issue-ID: AAI-4060 Change-Id: Id6d20adc8a8bab8bc914fb47353c37fd80905896 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-10-09Refactor DeltaEventsFiete Ostkamp7-237/+6
- get rid of StoreNotificationEvent class and directly publish to Kafka - use Lombok in related classes Issue-ID: AAI-4014 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: Ic6433b75a4540f597edf1316afe6d6c56a7bd08b
2024-10-09Merge "Refactor UEBNotification class"Nandkishor Patke14-195/+252
2024-10-09Refactor UEBNotification classFiete Ostkamp14-195/+252
- refactor UEBNotification class that it does not use ActiveMQ anymore and directly publishes to Kafka - use .domain.NotificationEvent class - serialize as late as possible Issue-ID: AAI-3931 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I3836519752f810f905a9aed96678d497783a2e5d
2024-10-07Update Janusgraph to 1.0.0Fiete Ostkamp1-11/+9
- update Janusgraph (0.6.4 -> 1.0.0) - update Tinkerpop (3.5.8 -> 3.7.1) Issue-ID: AAI-3743 Change-Id: I5f2f929645b8f327bc90eabab6c06a6b80bdbc3e Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-10-05Make Introspector serializable via JacksonFiete Ostkamp1-0/+58
- annotate Introspector, such that ObjectMapper can serialize it Issue-ID: AAI-4010 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I4896f811fa9db0637c941a11b01f26b734b15a21
2024-10-02Extract entity conversion logic into separate classFiete Ostkamp1-0/+119
Issue-ID: AAI-4008 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: Ic00d989ba97dd9e23d028d9e262ea2967d889e79
2024-09-21Migrate JAXB to jakartaFiete Ostkamp2-4/+4
- change javax.* JAXB packages to jakarta.* - bump snapshot version to 1.15.0-SNAPSHOT Issue-ID: AAI-4005 Change-Id: I2a208f717206a2ee8c2acaec8abb0a04fc620123 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-09-06AAI events are not being publishedFiete Ostkamp2-1/+120
- create e2e test case for notification sending - fix notification sending - disable tests since they can only be active with some larger refactoring Issue-ID: AAI-3988 Change-Id: I498b3b02218d81821dd17c3d8ad0da4de859924b Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-08-19Update spring-boot to 2.5 in aai-commonFiete Ostkamp1-11/+1
- update spring-boot (2.4 -> 2.5.15) - update vulnerable dependencies (spring-jms) - remove old codehaus.jackson dependency Issue-ID: AAI-3972 Change-Id: Ie0854c192a3a7bb719e9ac0e080e83a48e1b964a Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-08-05Add test for transaction rollback in HttpEntryFiete Ostkamp23-46/+179
- verify that transaction is rolled back when writing a request in a batch fails - remove all unused imports Issue-ID: AAI-3942 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I93cd1efa08db533a088e242694f07ff10db36b4e
2024-08-01Add tests for the NotificationServiceFiete Ostkamp4-67/+367
- change approach how ValidationService is injected into NotificationService - add tests for NotificationService - assert invokation of NotificationService instead of ValidationService in HttpEntryTest now Issue-ID: AAI-3940 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I4476857f7192f53de216f0515f0e69c642c33d1c
2024-07-23Make JMS-based messaging compatible with tracingFiete Ostkamp6-96/+242
- use dependency injection instead of new Foo() for jms related classes - inject interfaces and not their implementations - add integration test that asserts message sending via JMS to Kafka [1] [1] this also prepares removal of ActiveMQ as a middleman Issue-ID: AAI-3932 Change-Id: Icbdd264f5b52adc72aa05046ed66d9bd5108c372 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-07-20Extract HttpEntry notification logic into a separate NotificationServiceFiete Ostkamp12-17/+19
- introduce NotificationService - rename ueb package to notification - remove meaningless javadocs Issue-ID: AAI-3930 Change-Id: Ic6ffd5511235d2400b0d6db71f7d7aa13d2b076b Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-07-03Pagination will throw an IllegalArgumentException if there are no vertices ↵Fiete Ostkamp1-999/+1018
of the requested type - provide empty PaginationResponse when traversal.next() throws IllegalArgumentException Issue-ID: AAI-3917 Change-Id: I280f216050ea16953015023146d40674e067f028 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-06-28Update Janusgraph to 0.5.0 in aai-commonFiete Ostkamp1-13/+2
- update tinkerpop to 3.4.13 - update janusgraph to 0.5.0 - restore the total-pages header that was accidentally removed in the last pagination commit - remove stateful pagination logic from HttpEntry Issue-ID: AAI-3900 Change-Id: I5fac397ece75136673b8dc3866e10ff15dfdcee3 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-06-26Add gremlin-based pagination to aai-commonFiete Ostkamp2-37/+207
- enhance query building to support gremlin-based pagination - pagination is supported in two variants: with and without the total count of elements [1] - enhance query building to support gremlin-based sorting - add query logging that is currently disabled [1] due to the design of gremlin, including the total count results in a full graph scan. As such there is the option to not include it, which should make it (much) faster for the first pages that are returned. Issue-ID: AAI-3893 Change-Id: I6bc0c9b9f398556cc41a0a8f82e24e50c85e5690 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-06-17Bump aai-common version to 1.14.1Fiete Ostkamp1-1/+1
Issue-ID: AAI-3883 Change-Id: If89ec7af4b54462852c5578597112eb371b0c2f6 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-06-04Merge "Update janusgraph to 0.3.3"Fiete Ostkamp2-7/+11
2024-06-04Update janusgraph to 0.3.3Fiete Ostkamp2-7/+11
- update tinkerpop version from 3.2.11 to 3.3.0 - update janusgraph from 0.2.3 to 0.3.3 - the default GraphSON version would change with this update but was held back [1] - add jackson-dataformat-xml dependency to aai-core as the XmlMapper is used in the ErrorLogHelper [1] a separate story AAI-3796 - Use GraphSON v2 or v3 in AAI has been created for this Issue-ID: AAI-3795 Change-Id: I4539e83aa74c260d5238ebe869e9884d4396e9f4 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-05-29Refactor the ValidationServiceFiete Ostkamp2-2/+47
- slightly refactor the code - assert it's invocation in the HttpEntryTest Issue-ID: AAI-3864 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: If8d218f5c6467956e25fd1c4deb588f3fb5c7d2c
2024-05-28Refactor HttpEntry class - Part 1Fiete Ostkamp1-0/+6
- simplify setHttpEntryProperties (later on this will likely be done in the constructor) - move some logic of UEBNotification into separate methods - resolve jsonassert dependency conflict Issue-ID: AAI-3863 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: Ic84b43156890352509dc9c547478abdf53e96d6a
2024-04-10Remove DMaaP dependency from AAI-CommonSingh5-17/+234
- Remove Dmaap dependency in AAI-Common and replace it with Kafka. Issue-ID: AAI-3792 Change-Id: If3fd5c3bdc2448f7e260a26000b02a510c80d7fb Signed-off-by: Singh <soumya.e.singh@accenture.com>
2024-02-26Only load SchemaService related beans in aai-common when ↵Fiete Ostkamp1-2/+2
schema.translator.list=schema-service - conditionally load schema-service related config, otherwise use the ConfigTranslator - this prepares locally running traversal via mvn spring-boot:run Issue-ID: AAI-3787 Change-Id: I9415802fb708933e8596b62e7540fa8a156e4cd6 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-02-21Enhance SchemaGenerator to also generate indices for relationshipsFiete Ostkamp1-21/+22
- generate edge indexes when they not already exist - reindex existing indexes when they are not in status ENABLED - try to recover indexes that are in INSTALLED state - bump version to 1.13.5 Issue-ID: AAI-3782 Change-Id: I127e0f83b17485d7a6721206ade92cd50c89a51b Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-02-05Pivoting a TraversalURIOptimisedQuery is broken in release 1.13.2Fiete Ostkamp3-25/+106
- fix query building for TraversalURIOptimizedQuery - enable DataLinkTests for TRAVERSAL_URI again - add further tests to test pivoting more directly - roll back version to 1.13.2 to rerelease fixed version - add python six dependency to fix upstream issue with sphinxcontrib-swagger dependency Issue-ID: AAI-3758 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I3e54216e00d0491d64265e149f55cf8aba6fabd9
2024-01-25Update tinkerpop to 3.2.4Fiete Ostkamp5-1/+223
- work around hasStep inlining - add tests that more directly assert traversal state - add TinkerpopUpgradeTests test suite [1] - bump aai-common version to 1.13.2 [1] this allows to run the tests that are likely affected by a tinkerpop upgrade Issue-ID: AAI-3740 Change-Id: I86fb9b0c86802c7c0f74a5aae0976e81bf501eb0 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-01-22Merge "Revert "Update tinkerpop to 3.2.3 in aai-core""Nandkishor Patke1-153/+80
2024-01-20Revert "Update tinkerpop to 3.2.3 in aai-core"Fiete Ostkamp1-153/+80
This reverts commit 4e7ca21da096ff03ca70451fb5e7b95d3fd18f6e. Reason for revert: This is not properly fixing the underlying issue and was merged prematurely Issue-ID: AAI-3554 Change-Id: I3ff720bd5322712bdde13d774cc4366a9ed28650 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-01-20Merge "Update tinkerpop to 3.2.3 in aai-core"Nandkishor Patke1-80/+153
2024-01-19Update tinkerpop to 3.2.3 in aai-coreFiete Ostkamp1-80/+153
- eagerly clone queries as they are optimised at a later stage when called lazily Issue-ID: AAI-3554 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I18e97635d61e8cb08981cfea0143994f1572b39e
2024-01-11Update spring boot to 2.4Fiete Ostkamp14-14/+14
- update spring boot from 2.3 to 2.4 - remove compile-time dependency on powermock introduced by eelf-core - remove dependencyManagement declarations for powermock since it's not used anymore Issue-ID: AAI-3725 Change-Id: I05a35e0cee80b27123f28bb8eeb8ed885c83a173 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-01-10Update spring boot to 2.3Fiete Ostkamp2-4/+4
- update to 2.3 - bump version of all submodules to 1.13.1-SNAPSHOT Issue-ID: AAI-3724 Change-Id: Id089e27b236476907c4e7ca7e51d72b74d387d1c Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-01-10Ensure HttpEntry bean is request scoped in aai-commonFiete Ostkamp1-0/+2
- 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>
2023-12-22Refactor ErrorLogHelperFiete Ostkamp2-123/+0
- change is designed to not make any changes to the serialised objects [1] - introduce common error response object that is used for both service and policy, xml + json format - separate creation of error response and the marshalling of it - increase test coverage - use jackson object mappers for marshalling json and xml objects instead of custom MapperUtil - make code more functional - use more descriptive variable names [1] only the internal representation changes to account for both Service- and PolicyException Issue-ID: AAI-3695 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I1e82bf4f0706704679d14aac98969fa00beed758
2023-08-16Merge "Refactor HttpEntryTest"Lukasz Rajewski7-437/+809
2023-08-16Refactor HttpEntryTestFiete Ostkamp7-437/+809
- make test cases independently runnable by removing shared state - let method naming better reflect what is being tested - assign commonly used objects on the class level when they are not modified in the test case - parse error response object and assert error messages Other: - remove unnecessary saving in map in EdgeSerializer Issue-ID: AAI-3658 Change-Id: I3b9704b8a6b6cfa6ecf4930dc3b1d1a7ce84764a Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2023-08-11Refactor DBSerializer verifyResourceVersion methodFiete Ostkamp1-57/+79
- assign variables closer to where they are used - have a less complex validation logic - rename related test cases to better understand what they are doing - add further test cases (this would actually be better covered via a parameterized test) - rename DBSerializer variable in test cases to better match whith the name of the type it's representing Issue-ID: AAI-3657 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: Id7976b0123c17178845db115c09b5c00d2361e6d
2023-08-08Make URIParser code more readable - Part 2Fiete Ostkamp1-1/+1
- declare variables closer to where they are used - move more validation into the validatePath method - increment the global index variable i in fewer places Issue-ID: AAI-3656 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I64380b84370a362113bf64c4edff3d389ffb290e
2023-08-04Make URIParser code more readableFiete Ostkamp1-0/+41
Issue-ID: AAI-3655 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I26350e7279287c711f38194dbc1e8d302cf9a26d
2022-11-11Merge "Partially resolve resource leak warnings in aai-common"William Reehil1-2/+1
2022-11-11Merge "Reduce the number of raw-type related warnings in aai-common"William Reehil5-10/+34
2022-11-10Replace deprecated methods in aai-commonFiete Ostkamp8-44/+77
Issue-ID: AAI-3589 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I9e32b879ee0d143a6b66e06d425bed7412139e58
2022-11-09Reduce the number of raw-type related warnings in aai-commonFiete Ostkamp5-10/+34
Issue-ID: AAI-3586 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: If4affb02cfe40b4b82ecbdbb1a25d919d88be25c
2022-11-09Partially resolve resource leak warnings in aai-commonFiete Ostkamp1-2/+1
Issue-ID: AAI-3585 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: Ic871d58bafb385737ecea6ea18c2fb589f4dc369
2022-11-07Reduce the number of problems in aai-common by removing unused importsFiete Ostkamp76-2164/+1604
- run mvn spotless:apply across aai-commmon to remove unused imports - run mvn formatter:format across aai-common Issue-ID: AAI-3583 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I2dfeb395eafa2824ce8369bba3a18db3e1845522
2022-10-14Remove the apache commons-lang dependency in aai-commonFiete Ostkamp6-71/+48
Issue-ID: AAI-3551 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: Ib68b6fb43044532abf39c1ac088ef969c5aa00c2
2022-10-13Migrate Mockito 1 to version 2 in aai-coreFiete Ostkamp5-27/+35
Issue-ID: AAI-3549 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: Ibb8edcd80fe3b112af0d113894122ce0b256006b
2022-09-29Replace deprecated Gremlin query in aai-commonFiete Ostkamp1-16/+25
addInE and addOutE are deprecated since Gremlin 3.1.0. Issue-ID: AAI-3534 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I4c4db97d8075e9c75b13ee206c27b8c01b5e0cf4