apm-agent-nodejs icon indicating copy to clipboard operation
apm-agent-nodejs copied to clipboard

use newly `await`able `agent.flush()` in tests

Open trentm opened this issue 2 years ago • 1 comments

Now that awaitable flush() is in there are a few usages of promisify(agent.flush.bind(agent))() that could be converted over to use it for a slight cleanup.

trentm avatar Feb 27 '23 19:02 trentm

Hi @trentm I'd like to take this one.

Now that agent.flush() is natively await, it makes sense to clean up the existing promisify(agent.flush.bind(agent))() usages. I’ll update those calls to use the new awai method, remove unnecessary promisify imports where applicable, and make sure everything stays functionally equivalent. Should be a small but nice readability win.

Siddhu545 avatar Apr 14 '25 11:04 Siddhu545