novitski / bitcoinj

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

HDW: Tests fail, block too far in the future #542

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm on 3e7369c69c4b52e0260a0acf209ac3edad2137a3.

I run mvn clean install (at project root).

See attached log and some test reports (all the same exceptions).

Original issue reported on code.google.com by andreas....@gmail.com on 28 Mar 2014 at 7:37

Attachments:

GoogleCodeExporter commented 9 years ago
Just reconfirmed that current master builds fine.

Original comment by andreas....@gmail.com on 28 Mar 2014 at 7:41

GoogleCodeExporter commented 9 years ago
I think this is just a giant race condition. All these tests roll the mock 
clock without ever resetting it to defined point (like current time).

If I run tests separately they succeed.

In order to reproduce the errors, I suggest building on a slower machine.

Original comment by andreas....@gmail.com on 29 Mar 2014 at 9:13

GoogleCodeExporter commented 9 years ago

Original comment by andreas....@gmail.com on 29 Mar 2014 at 9:20

GoogleCodeExporter commented 9 years ago
Fixed this for master: https://github.com/bitcoinj/bitcoinj/pull/34

I suggest merging this, then rebase hdw-alpha on master and fix 
KeyChainGroupTest and BasicKeyChainTest to use setMockClock() rather than 
rollMockClock(0).

Original comment by andreas....@gmail.com on 29 Mar 2014 at 9:39

GoogleCodeExporter commented 9 years ago
Great catch, you're exactly right. The HDW work has slowed down all the unit 
tests which made this bug show up. I plan to fix it by putting default 
lookahead size into NetworkParameters so not all the new Wallet() calls in 
every test have to be adjusted.

Original comment by mh.in.en...@gmail.com on 29 Mar 2014 at 1:37