clightning4j / JRPClightning

:zap: Java framework for C-Lightning to work with the RPC interface, and also the library simplifies the work to develop custom plugins with Java, Kotlin, and all the languages that supports the Java dependencies :zap:
https://clightning4j.github.io/JRPClightning/
GNU General Public License v2.0
16 stars 9 forks source link

disable or rewrite the flacky test #86

Open vincenzopalazzo opened 1 year ago

vincenzopalazzo commented 1 year ago

Recent integration testing show that there is something wrong with this test, so we should diable it or fix it

jrcplightning_1  |   Test testCommandConnectAndCloseOne FAILED
jrcplightning_1  | 
jrcplightning_1  |   junit.framework.AssertionFailedError: Error when running the command FUNDCHANNEL.
jrcplightning_1  |   Error inside command with error code: 304
jrcplightning_1  |    Message: Still syncing with bitcoin network 
jrcplightning_1  |    listfunds -> {"outputs":
theborakompanioni commented 1 year ago

Hmm.. it seems that this is always skipped on my end

jrcplightning_1  |   Test testCommandConnectAndCloseOne SKIPPED

Also, I cannot seem to run the test multiple times:

jrcplightning_1  | run c-lightning
jrcplightning_1  | bitcoind has gone backwards from 6228 to 300 blocks!
jrcplightning_1  | bitcoind has gone backwards from 6927 to 300 blocks!
jrcplightning_1  | lightning-cli: Connecting to 'lightning-rpc': Connection refused
jrcplightning_1  | lightning-cli: Connecting to 'lightning-rpc': Connection refused
jrcplightning_1  | lightning-cli: Connecting to 'lightning-rpc': Connection refused
jrcplightning_1  | error code: -5
jrcplightning_1  | error message:
jrcplightning_1  | Invalid Bitcoin address: 
jrcplightning_1  | lightning-cli: Connecting to 'lightning-rpc': Connection refused

Always need to start clean for the tests to run through successfully. How do you do it?

vincenzopalazzo commented 1 year ago

Just this docker-compose up --exit-code-from jrcplightning

Then it will create some directory in the sandbox regarding the regtest that need to be deleted manually unfortunately, but all the testing is managed with docker

vincenzopalazzo commented 1 year ago

btw I guess we can put an @Ignore on top of the test and ignore it.

The test are written badly unfortunatly