aionnetwork / AVM

Enabling Java code to run in a blockchain environment
https://theoan.com/
MIT License
49 stars 25 forks source link

AvmRule produces too much output in the default case #415

Closed fulldecent closed 5 years ago

fulldecent commented 5 years ago

In the default usage case, AvmRule produces too much output to console.

For example, in this build, there is much verbose output https://travis-ci.com/fulldecent/aion-aip040/builds/124665268

However all the tests pass. It is not expected that so much detail would be shown for something that is working as expected.

aion-shidokht commented 5 years ago

This is because AvmRule was initialized with debug mode enabled. This will enable logging of verbose uncaught contract exceptions (including failed Blockchain.require statements). If you were expecting such failures in your test, they will pass. However, you can still see the output. Once you are done debugging your contract you can start running your tests by disabling debug mode.

fulldecent commented 5 years ago

Could you please advise how I may update the linked project to project for best practice?

All tests passing, code implemented. Output too verbose. Would appreciate if you could please demonstrate with a brief PR.

aion-shidokht commented 5 years ago

The first parameter in AvmRule correlates to debug mode. Just change that to false to disable debugging features.

@Rule
public AvmRule avmRule = new AvmRule(false);
fulldecent commented 5 years ago

Thank you, updated at ab19595