Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Fix: Increment stats.MessagesSent in msgToStream() function #441

Merged
merged 8 commits into from
Sep 10, 2020

Commits on Sep 9, 2020

  1. Share common code between network/ipfs_impl_test.go tests

    Extract the code that is common in TestMessageResendAfterError,
    TestMessageSendTimeout and TestMessageSendNotSupportedResponse to a
    separate function.
    wolneykien committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    071b752 View commit details
    Browse the repository at this point in the history
  2. Make prepareNetwork() return two hosts and two networks

    Let prepareNetwork() make simmetric setup with two `ErrHost`s
    with two `impl` networks to be sure we test `impl` instances on
    both ends.
    wolneykien committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    6c662b9 View commit details
    Browse the repository at this point in the history
  3. Added TestNetworkCounters test to the "network" package

    The test shows we have a problem with `MessagesSent` counter.
    wolneykien committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    eb974d3 View commit details
    Browse the repository at this point in the history
  4. Fix: Increment stats.MessagesSent in msgToStream() function

    Fixes the bug with incrementing `MessagesSent` counter only in
    `SendMessage()` method if `impl`. Now it works for `MessageSender`
    too.
    wolneykien committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    8129d6f View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2020

  1. Allow to specify a network event listener for tests

    Added `listener network.Notifiee` to the `receiver` structure.
    If a listener is specified then `prepareNetwork()` connects it
    to the mock network it builds before making any connections.
    wolneykien committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    59dfdb0 View commit details
    Browse the repository at this point in the history
  2. Wait for all network streams are closed in testNetworkCounters

    Wait for all network streams are closed instead of just using a
    timeout. The timeout of 5 s is still used as a deadline (it makes
    the test to fail).
    wolneykien committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    d4fdba7 View commit details
    Browse the repository at this point in the history
  3. Fix: Close the MessageSender in testNetworkCounters()

    The `MessageSender` needs to be closed if we want all streams in
    the network to be closed.
    wolneykien committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    f07cb7a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    08b9135 View commit details
    Browse the repository at this point in the history