Skip to content

Commit 7d66cb1

Browse files
committed
init
1 parent f586cda commit 7d66cb1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/testObservability/helper/helper.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,12 @@ exports.mapTestHooks = (test) => {
495495
exports.mapTestHooks(test.parent);
496496
}
497497

498+
const sleep = () => {
499+
return new Promise((resolve) => {
500+
setTimeout(resolve, 3000);
501+
})
502+
}
503+
498504
exports.batchAndPostEvents = async (eventUrl, kind, data) => {
499505
const config = {
500506
headers: {
@@ -506,6 +512,7 @@ exports.batchAndPostEvents = async (eventUrl, kind, data) => {
506512

507513
try {
508514
const eventsUuids = data.map(eventData => `${eventData.event_type}:${eventData.test_run ? eventData.test_run.uuid : (eventData.hook_run ? eventData.hook_run.uuid : null)}`).join(', ');
515+
await sleep();
509516
exports.nodeRequestForLogs(`[Request Batch Send] for events:uuids ${eventsUuids}`)
510517
const response = await nodeRequest('POST',eventUrl,data,config);
511518
exports.nodeRequestForLogs(`[Request Batch Repsonse] ${util.format(response.data)} for events:uuids ${eventsUuids}`)

0 commit comments

Comments
 (0)