irods / irods_client_http_java

test wrapper for iRODS HTTP API
0 stars 1 forks source link

Figure out why writing to a resource makes the `testCommonOperations` fail in `ResourceOperationsTest` #61

Open sam-i-am012 opened 3 months ago

sam-i-am012 commented 3 months ago

Message in logs:

[P:1] [error] [T:10] op_write: Could not open data object for write.

Relevant code:

// TODO(#61): figure out why writing to a resource makes test fail
//  Message from logs: could not open data object for write

// Create a data object targeting the replication resource.
byte[] contents = "hello, iRODS HTTP API!".getBytes();
DataObjectWriteParams writeParams = new DataObjectWriteParams();
writeParams.setResource(rescRepl);
writeParams.setOffset(0);
res = rods.dataObject().write(rodsToken, dataObject, contents, writeParams);

Running the request without this line:

writeParams.setResource(rescRepl);

works without any problems, so I'm thinking the problem is with writing to the resource.