Skip to content
  • Jay Guo's avatar
    [FAB-14466] More realistic etcdraft UT network mock · d50bd8d7
    Jay Guo authored
    
    
    Two nodes can exchange messages only if `configurator.Configure`
    is called on both sides. Currently, etcdraft UT network mock assumes
    nodes can accept messages from any node as long as it's connected,
    however this does not reflect the actual behavior of network and
    UT failed to capture bugs such as FAB-14413 because of this.
    
    This CR makes network mock more realistic by adding `links` to it.
    A link is open if nodes on both sides have called `Configure`.
    
    Also, this CR fixes another minor problem in UT, where `support`
    should get prepared *prior to* the start of new chain.
    
    Change-Id: I08b0cd84e9e0774dd130a70293d7c6b328ffb94c
    Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
    d50bd8d7