danielmcclure / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 1 forks source link

Unit tests fail when running bitcoind in testnet mode locally #587

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I run a bitcoin-qt with -testnet option on localhost. 

I get 148 unit tests failures.

These tests fail on "java.net.BindException: Address already in use" (an 
exception is thrown), example test that fails:

PeerGroupTest.singleDownloadPeer1

This test: 
FilteredBlockAndPartialMerkleTreeTests.serializeDownloadBlockWithWallet is 
failing on line 
        assertEquals(1, peerGroup.numConnectedPeers());

It seems to me that when running unit tests, they try to connect to my node (or 
start listening on the same port?) which causes problems.

To reproduce:
1. checkout latest master code (probably any other will fail too)
2. Run bitcoind in testnet mode on localhost
3. start unit tests (from IDE or "mvn test")
4. 148 tests will fail

Original issue reported on code.google.com by wlangiew...@gmail.com on 25 Oct 2014 at 10:05

GoogleCodeExporter commented 9 years ago
Fixed in https://github.com/bitcoinj/bitcoinj/pull/255, this issue can be 
closed.

Original comment by wlangiew...@gmail.com on 2 Nov 2014 at 4:20

GoogleCodeExporter commented 9 years ago

Original comment by andreas....@gmail.com on 2 Nov 2014 at 4:38