International-Data-Spaces-Association / DataspaceConnector

This is an IDS Connector reference implementation.
Apache License 2.0
31 stars 25 forks source link

Error with N times usage policy when load testing is performed #715

Open jfernandezsqs opened 1 year ago

jfernandezsqs commented 1 year ago

I have deployed IDS-testbed, which is using version 8.0.2 for the connector, and implemented the N times usage policy allowing just two data downloads. I have performed a contract agreement between the connectors and I get the datalink to download the data.

At this point, I have used de tool Jmeter to perform load testing against the connector. It has been requested the data multiple times in a small period of time.

I have been able to download the data more than the defined usage policy implementation. It should just give me two data downloads and actually I have been able to download it more times (six downloads) as it is detailed in the image below.

image

The rule implementation is not working correctly under load testing.

I guess that the reason for this behavior could be that it is not counting the number of successful downloads, and it gives to the consumer more than the admitted ArtifactResponeMessage.

In the following image is my understanding of the behavior and a procedure proposal that could fix this issue.

image