Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Add scenarios in integration tests relevant to lisk-p2p #1124

Merged
merged 7 commits into from
Feb 24, 2019

Conversation

ishantiw
Copy link
Contributor

@ishantiw ishantiw commented Feb 20, 2019

Description

Add missing integration tests on lisk-p2p. Cover different scenarios like, for example, when a couple of nodes become unresponsive due to some reason, other nodes connected should be able to detect and update their network status gracefully.

Review checklist

  • The PR resolves #INSERT_ISSUE_NUMBER
  • All new code is covered with unit tests
  • All new code was formatted with Prettier
  • Linting passes
  • Tests pass
  • Commit messages follow the commit guidelines
  • Documentation has been added/updated

@@ -46,9 +47,9 @@ describe('Integration tests for P2P library', () => {
afterEach(async () => {
await Promise.all(
p2pNodeList.map(async p2p => {
try {
if (p2p.isActive) {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe filter first?
p2pNodeList.filter(p2p => p2p.isActive).map(xxx

@@ -198,15 +211,177 @@ describe('Integration tests for P2P library', () => {
await wait(DISCOVERY_INTERVAL * 5);

p2pNodeList.forEach(p2p => {
let {connectedPeers} = p2p.getNetworkStatus();
let { connectedPeers } = p2p.getNetworkStatus();
Copy link
Contributor

Choose a reason for hiding this comment

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

const here?

packages/lisk-p2p/test/integration/p2p.ts Show resolved Hide resolved
@ishantiw
Copy link
Contributor Author

ishantiw commented Feb 22, 2019

I will add test cases related to the custom selection function. Issue created #1131

@shuse2 shuse2 merged commit c0eab51 into release/2.1.0 Feb 24, 2019
@shuse2 shuse2 deleted the add_missing_scenarios branch February 24, 2019 17:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants