forked from TrueCloudLab/xk6-frostfs
[#32] scenarios: Log object info on errors
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
883c3c259a
commit
aa1cbb957c
1 changed files with 3 additions and 3 deletions
|
@ -116,7 +116,7 @@ export function obj_write() {
|
||||||
const { payload, hash } = generator.genPayload(registry_enabled);
|
const { payload, hash } = generator.genPayload(registry_enabled);
|
||||||
const resp = grpc_client.put(container, headers, payload);
|
const resp = grpc_client.put(container, headers, payload);
|
||||||
if (!resp.success) {
|
if (!resp.success) {
|
||||||
console.log(resp.error);
|
console.log({cid: container, error: resp.error});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ export function obj_read() {
|
||||||
const obj = obj_list[Math.floor(Math.random() * obj_list.length)];
|
const obj = obj_list[Math.floor(Math.random() * obj_list.length)];
|
||||||
const resp = grpc_client.get(obj.container, obj.object)
|
const resp = grpc_client.get(obj.container, obj.object)
|
||||||
if (!resp.success) {
|
if (!resp.success) {
|
||||||
console.log(resp.error);
|
console.log({cid: obj.container, oid: obj.object, error: resp.error});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ export function obj_delete() {
|
||||||
const resp = grpc_client.delete(obj.c_id, obj.o_id);
|
const resp = grpc_client.delete(obj.c_id, obj.o_id);
|
||||||
if (!resp.success) {
|
if (!resp.success) {
|
||||||
// Log errors except (2052 - object already deleted)
|
// Log errors except (2052 - object already deleted)
|
||||||
console.log(resp.error);
|
console.log({cid: obj.c_id, oid: obj.o_id, error: resp.error});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue