mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-23 14:40:40 +01:00
PeerGroupTest: Add listeners before calling start()
PeerGroupTest.listener() currently starts the PeerGroup before adding listeners to it. While the events being listened for are not triggered until later in the test, it is good practice to add listeners before calling start()
This commit is contained in:
parent
509df8c232
commit
aa33c0e843
1 changed files with 1 additions and 1 deletions
|
@ -108,9 +108,9 @@ public class PeerGroupTest extends TestWithPeerGroup {
|
|||
|
||||
@Test
|
||||
public void listener() throws Exception {
|
||||
peerGroup.start();
|
||||
peerGroup.addConnectionEventListener(listener);
|
||||
peerGroup.addPreMessageReceivedEventListener(preMessageReceivedListener);
|
||||
peerGroup.start();
|
||||
|
||||
// Create a couple of peers.
|
||||
InboundMessageQueuer p1 = connectPeer(1);
|
||||
|
|
Loading…
Add table
Reference in a new issue