0
votes

I'm trying to performance test APIs of a CorDapp(built with open source Corda) using JMeter.

One of the API requires file upload,when I'm trying to upload a file multiple times(using more than 1 Number of threads) I get the 'net.corda.nodeapi.exceptions.DuplicateAttachmentException' response along with status code 500.

I guess the error is because the hash that is generated takes the file as well as timestamp as its inputs and when I try to do multiple uploads at the same instant, timestamp basically remains same,which results in same hash generation with every http request, hence resulting in the above mentioned error. How can I solve this issue as without properly hitting this API I cannot test subsequent APIs.

1
Uploading the same file always gives same hash. So you better try using different file or handle the error and proceed with next steps. - Shivaganesh

1 Answers

0
votes

Corda prohibits upload the same attachment file twice. This is why you are seeing this error.