Skip to content

Commit

Permalink
Speed up tracer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zodern committed Dec 23, 2024
1 parent a96c278 commit fba4342
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/tracer/tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -985,17 +985,17 @@ addAsyncTest('Tracer - Build Trace - the correct number of async events are capt
let info;

const methodId = registerMethod(async function () {
await sleep(60);
await sleep(70);
await sleep(15);
await sleep(20);

info = getInfo();

return await sleep(80);
return await sleep(20);
});

await callAsync(methodId);

const asyncEvents = info.trace.events.filter(([type, duration]) => type === EventType.Async && duration >= 50);
const asyncEvents = info.trace.events.filter(([type, duration]) => type === EventType.Async && duration >= 10);

test.equal(asyncEvents.length, 3);
});
Expand All @@ -1006,7 +1006,7 @@ addAsyncTest('Tracer - Build Trace - the correct number of async events are capt
let info;

Meteor.publish(subName, async function () {
await sleep(100);
await sleep(20);

info = getInfo();

Expand All @@ -1015,7 +1015,7 @@ addAsyncTest('Tracer - Build Trace - the correct number of async events are capt

await subscribeAndWait(client, subName);

const asyncEvents = info.trace.events.filter(([type, duration]) => type === EventType.Async && duration >= 100);
const asyncEvents = info.trace.events.filter(([type, duration]) => type === EventType.Async && duration >= 15);

test.equal(asyncEvents.length,1);
});
Expand Down

0 comments on commit fba4342

Please sign in to comment.