Skip to content

[p2p] Peer behaviour test tweaks#3662

Merged
ebuchman merged 3 commits intotendermint:developfrom
brapse:peer-behaviour-test-tweaks
May 27, 2019
Merged

[p2p] Peer behaviour test tweaks#3662
ebuchman merged 3 commits intotendermint:developfrom
brapse:peer-behaviour-test-tweaks

Conversation

@brapse
Copy link
Contributor

@brapse brapse commented May 14, 2019

Peer behaviour test tweaks towards #3653.

Address the remaining test issues mentioned in #3552 notably:

  • switch to p2p_test package
  • Use Error instead of Errorf when not using formatting
  • Add expected/got errors to
  • TestMockPeerBehaviourReporterConcurrency test

Also addresses a bug in equalBehaviours in which only the lengths of the behaviours was being tested and not the actual contents.

  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

brapse added 2 commits May 14, 2019 15:30
    Address the remaining test issues mentioned in #tendermint#3552 notably:
    + switch to p2p_test package
    + Use `Error` instead of `Errorf` when not using formatting
    + Add expected/got errors to
    `TestMockPeerBehaviourReporterConcurrency` test
    + slices of PeerBehaviours should be compared as histograms to
    ensure they have the same set of PeerBehaviours at the same
    freequncy.
@brapse brapse requested review from ebuchman, melekes and xla as code owners May 14, 2019 14:17
@codecov-io
Copy link

codecov-io commented May 14, 2019

Codecov Report

Merging #3662 into develop will decrease coverage by <.01%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #3662      +/-   ##
===========================================
- Coverage    63.18%   63.17%   -0.01%     
===========================================
  Files          218      218              
  Lines        18194    18200       +6     
===========================================
+ Hits         11496    11498       +2     
- Misses        5727     5732       +5     
+ Partials       971      970       -1
Impacted Files Coverage Δ
privval/signer_service_endpoint.go 83.63% <0%> (-1.82%) ⬇️
p2p/pex/pex_reactor.go 81.6% <0%> (-0.6%) ⬇️
tools/tm-bench/transacter.go 8.49% <0%> (-0.47%) ⬇️
consensus/state.go 79.73% <0%> (-0.12%) ⬇️
consensus/reactor.go 70.6% <0%> (ø) ⬆️
libs/db/remotedb/grpcdb/client.go 0% <0%> (ø) ⬆️
p2p/conn/connection.go 80.85% <0%> (+0.26%) ⬆️
blockchain/pool.go 80.59% <0%> (+0.32%) ⬆️
consensus/replay.go 71.02% <0%> (+0.81%) ⬆️
privval/signer_remote.go 82% <0%> (+2%) ⬆️

    + Add tests for the equivalence between sets of PeerBehaviours
@brapse brapse changed the title WIP: Peer behaviour test tweaks Peer behaviour test tweaks May 14, 2019
@brapse brapse changed the title Peer behaviour test tweaks [p2p] Peer behaviour test tweaks May 22, 2019
@ebuchman ebuchman merged commit b9508ff into tendermint:develop May 27, 2019
@melekes melekes mentioned this pull request May 30, 2019
44 tasks
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.

3 participants