Skip to content

Feat: Agent connect/disconnect events#558

Merged
mcollina merged 4 commits intonodejs:masterfrom
ognjenjevremovic:feat/agent-events
Feb 19, 2021
Merged

Feat: Agent connect/disconnect events#558
mcollina merged 4 commits intonodejs:masterfrom
ognjenjevremovic:feat/agent-events

Conversation

@ognjenjevremovic
Copy link
Copy Markdown
Contributor

Closes: #522

  • Add support for connect and disconnect events to Agent.
  • Provide the necessary set of tests for this change.
  • Increase the test coverage of Agent, by testing the pool instance returned from the Agent get method.

@ronag If any changes are required prior to merging these changes, I'll be more than glad to contribute.

Ognjen Jevremovic added 4 commits February 19, 2021 11:17
Extend EventEmitter class from within Agent and define support for the
connect and disconnect events.

✅ Closes: nodejs#522
Provide minimum set of tests for connect/disconnect events for the Agent
class.

✅ Closes: nodejs#522
Disconnect event listener should be removed from the pool/client
(acquired through the Agent instance) when instance of the Agent class
is destroyed.

✅ Closes: nodejs#522
Provide the tests for the Agent get method, checking weather the pool is
instance of Client or Pool class.

✅ Closes: nodejs#522
@ronag ronag requested a review from mcollina February 19, 2021 10:47
Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 138ad61 into nodejs:master Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add connect/disconnect events to Agent

3 participants