bxbot
bxbot copied to clipboard
Test fails in TestKrakenExchangeAdapter
Running, for instance, mvn verify to run the tests lets the process fail like shown below. The file TextKrakenEchangeAdapter generates failures
I think it has to do with the precision that's allowed for the pairs (for USD just one decimal, and two are used in the exchange test data ) but my understanding of the project is not strong enough to check if this is the case
Test set: com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter
Tests run: 42, Failures: 6, Errors: 2, Skipped: 0, Time elapsed: 5.505 s <<< FAILURE! - in com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter testGettingLatestMarketPriceSuccessfully(com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter) Time elapsed: 2.705 s <<< FAILURE! java.lang.AssertionError:
Expectation failure on verify:
KrakenExchangeAdapter.sendPublicRequestToExchange("AssetPairs",
testGettingMarketOrdersSuccessfully(com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter) Time elapsed: 0.07 s <<< FAILURE! java.lang.AssertionError: expected:<0> but was:<1> at com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter.testGettingMarketOrdersSuccessfully(TestKrakenExchangeAdapter.java:246)
testCreateOrderToBuyIsSuccessful(com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter) Time elapsed: 0.007 s <<< FAILURE! java.lang.AssertionError:
Unexpected method call Map.put("price", "456.41"): at com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter.testCreateOrderToBuyIsSuccessful(TestKrakenExchangeAdapter.java:497)
testCreateOrderToSellIsSuccessful(com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter) Time elapsed: 0.015 s <<< FAILURE! java.lang.AssertionError:
Expectation failure on verify:
KrakenExchangeAdapter.sendPublicRequestToExchange("AssetPairs",
testGettingTickerSuccessfully(com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter) Time elapsed: 0.01 s <<< FAILURE! java.lang.AssertionError:
Expectation failure on verify:
KrakenExchangeAdapter.sendPublicRequestToExchange("AssetPairs",
testSendingPublicRequestToExchangeSuccessfully(com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter) Time elapsed: 0.084 s <<< FAILURE! java.lang.AssertionError:
Expectation failure on verify:
KrakenExchangeAdapter.makeNetworkRequest(https://api.kraken.com/0/public/AssetPairs, "GET",
testSendingAuthenticatedRequestToExchangeSuccessfully(com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter) Time elapsed: 0.008 s <<< ERROR! com.gazbert.bxbot.trading.api.TradingApiException: Unexpected error has occurred in Kraken Exchange Adapter. at com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter.testSendingAuthenticatedRequestToExchangeSuccessfully(TestKrakenExchangeAdapter.java:1333) Caused by: java.lang.UnsupportedOperationException at com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter.testSendingAuthenticatedRequestToExchangeSuccessfully(TestKrakenExchangeAdapter.java:1333)
testSendingAuthenticatedRequestToExchangeHandlesExchangeNetworkException(com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter) Time elapsed: 0.005 s <<< ERROR! java.lang.Exception: Unexpected exception, expected<com.gazbert.bxbot.trading.api.ExchangeNetworkException> but was<com.gazbert.bxbot.trading.api.TradingApiException> at com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter.testSendingAuthenticatedRequestToExchangeHandlesExchangeNetworkException(TestKrakenExchangeAdapter.java:1396) Caused by: java.lang.UnsupportedOperationException at com.gazbert.bxbot.exchanges.TestKrakenExchangeAdapter.testSendingAuthenticatedRequestToExchangeHandlesExchangeNetworkException(TestKrakenExchangeAdapter.java:1396)
To Reproduce Steps to reproduce the behavior:
- I configured the bot to run against Bitstamp...
- I started the bot successfully...
- When the bot tried to send a buy order, it shutdown with xyz error ...
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Please complete the following information:
- OS: [e.g. Debian 4.9.168]
- Bot Version [e.g. 0.11.0]
- Exchange [e.g. Bitstamp]
Additional context Add any other context about the problem here.
@roywasse - are you still getting the issue with the latest release of the bot?
Closing. Will re-open if still an issue.