aboutsummaryrefslogtreecommitdiffstats
path: root/aai-core/src/test
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-06-26 14:12:55 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-06-28 16:14:12 +0200
commit037c33e49b202218261b474439def75d508717f4 (patch)
treea394dc0d4c8ca7e72a11dbed09441225cc49ddf9 /aai-core/src/test
parentbdcbdc723dfb3cd4c29fa3cdbe76ceb0df2a8033 (diff)
Update Janusgraph to 0.5.0 in aai-common
- 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>
Diffstat (limited to 'aai-core/src/test')
-rw-r--r--aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java15
1 files changed, 2 insertions, 13 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java b/aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java
index 0dcec24d..3bf991ec 100644
--- a/aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java
+++ b/aai-core/src/test/java/org/onap/aai/rest/db/HttpEntryTest.java
@@ -319,8 +319,10 @@ public class HttpEntryTest extends AAISetup {
Response response = doRequest(traversalHttpEntry, loader, dbEngine, HttpMethod.GET, uri, queryOptions);
JSONObject actualResponseBody = new JSONObject(response.getEntity().toString());
String totalCount = response.getHeaderString("total-results");
+ String totalPages = response.getHeaderString("total-pages");
assertEquals(2, Integer.parseInt(totalCount));
+ assertEquals(2, Integer.parseInt(totalPages));
assertEquals(1, actualResponseBody.getJSONArray("pserver").length());
assertEquals("Expected the pservers to be returned", 200, response.getStatus());
verify(validationService, times(1)).validate(any());
@@ -986,19 +988,6 @@ public class HttpEntryTest extends AAISetup {
}
@Test
- public void testSetGetPaginationMethods() {
- traversalHttpEntry.setHttpEntryProperties(schemaVersions.getDefaultVersion());
- traversalHttpEntry.setPaginationBucket(10);
- traversalHttpEntry.setPaginationIndex(1);
- traversalHttpEntry.setTotalsForPaging(101, traversalHttpEntry.getPaginationBucket());
- assertEquals("Expected the pagination bucket size to be 10", 10, traversalHttpEntry.getPaginationBucket());
- assertEquals("Expected the total number of pagination buckets to be 11", 11,
- traversalHttpEntry.getTotalPaginationBuckets());
- assertEquals("Expected the pagination index to be 1", 1, traversalHttpEntry.getPaginationIndex());
- assertEquals("Expected the total amount of vertices to be 101", 101, traversalHttpEntry.getTotalVertices());
- }
-
- @Test
public void setDepthTest() throws AAIException {
System.setProperty("AJSC_HOME", ".");
System.setProperty("BUNDLECONFIG_DIR", "src/main/test/resources");