aionnetwork / node_test_harness

A test harness for functional integration testing the Aion kernel(s)
MIT License
0 stars 4 forks source link

BalanceTransferTest rust version - checking wrong place for Blockchain print message #61

Closed aion-kelvin closed 5 years ago

aion-kelvin commented 5 years ago

In Java kernel, kernel logs are output to stdout. Blockchain.println goes to stdout also.

In Rust kernel, kernel logs go to stderr. Blockchain.println goes to stdout.

In the test org.aion.harness.tests.integ.rust.BalanceTransferTest, it looks for a kernel log message and also a Blockchain.println in stderr:
https://github.com/aionnetwork/node_test_harness/blob/master/Tests/test/org/aion/harness/tests/integ/rust/BalanceTransferTest.java#L268

As a result, the test erroneously fails. It needs to look for the println in stderr instead.

aionick commented 5 years ago

I guess the most obvious question is why are logs being written to stderr? And is this something the rust kernel is intentionally doing?

aion-kelvin commented 5 years ago

Pretty sure it's intentional. I don't think it's uncommon for logs of long-running processes to be sent to stderr.

aionick commented 5 years ago

That's fair, I suppose we will just want a solution to this that makes further java/rust integration in the harness practical

aion-kelvin commented 5 years ago

Yeah I mostly care just because it's a slight hindrance to having one set of tests for both kernels

aion-kelvin commented 5 years ago

fixed by https://github.com/aionnetwork/node_test_harness/commit/9793591827e8398cfe26979f91d6ec8de3433aa3 and https://github.com/aionnetwork/node_test_harness/commit/7d36d6d305c7aa9911d075033c95666aa096eda6