diff options
author | ToineSiebelink <toine.siebelink@est.tech> | 2024-04-19 10:25:01 +0100 |
---|---|---|
committer | ToineSiebelink <toine.siebelink@est.tech> | 2024-04-19 10:25:01 +0100 |
commit | 99321315f0bd3d2838eeee4ca10fbaa66f47b2d1 (patch) | |
tree | 755a696c3d4047882a52a00d103a7a0691c530e4 /cps-ncmp-rest | |
parent | b4e377ec637b540ea9259c2ad92ce89e105d22aa (diff) |
Temporary dsiable Operation Too Large Exception
- settign limit to 50000 to efftively disable it
- ericsson is not ready and wil infrom us when it can be enabled again
Issue-ID: CPS-2164
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ib1a8308a20bd77fcba9c4c9fc94739d5dd731b1f
Diffstat (limited to 'cps-ncmp-rest')
2 files changed, 4 insertions, 3 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpPassthroughResourceRequestHandler.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpPassthroughResourceRequestHandler.java index eca7ebfe31..64497b95f9 100644 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpPassthroughResourceRequestHandler.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpPassthroughResourceRequestHandler.java @@ -46,7 +46,7 @@ public class NcmpPassthroughResourceRequestHandler extends NcmpDatastoreRequestH private static final Object noReturn = null; - private static final int MAXIMUM_CM_HANDLES_PER_OPERATION = 50; + private static final int MAXIMUM_CM_HANDLES_PER_OPERATION = 50000; private static final String PAYLOAD_TOO_LARGE_TEMPLATE = "Operation '%s' affects too many (%d) cm handles"; diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy index aef37c91e4..1585616870 100644 --- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy +++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy @@ -143,14 +143,15 @@ class NcmpDatastoreRequestHandlerSpec extends Specification { def 'Attempt to execute async data operation request with too many cm handles.'() { given: 'a data operation definition with too many cm handles' - def cmHandleIds = new String[51] + def tooMany = objectUnderTest.MAXIMUM_CM_HANDLES_PER_OPERATION+1 + def cmHandleIds = new String[tooMany] def dataOperationDefinition = new DataOperationDefinition(operationId: 'abc', operation: 'read', datastore: 'ncmp-datastore:passthrough-running', cmHandleIds: cmHandleIds) when: 'data operation request is executed' objectUnderTest.executeRequest('someTopic', new DataOperationRequest(dataOperationDefinitions:[dataOperationDefinition]), NO_AUTH_HEADER) then: 'a payload too large exception is thrown' def exceptionThrown = thrown(PayloadTooLargeException) and: 'the error message contains the offending number of cm handles' - assert exceptionThrown.message == "Operation 'abc' affects too many (51) cm handles" + assert exceptionThrown.message == "Operation 'abc' affects too many (${tooMany}) cm handles" } } |