thrasher-corp / gocryptotrader

A cryptocurrency trading bot and framework supporting multiple exchanges written in Golang.
MIT License
2.98k stars 799 forks source link

Okx: Fix TestGetBlockTrade transient fail #1583

Closed gbjk closed 1 month ago

gbjk commented 1 month ago

Last block trade has fallen outside 7 days many times now. Switching to within 90 days, which appears safe.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 36.28%. Comparing base (90fee94) to head (1fb34bd).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1583/graphs/tree.svg?width=650&height=150&src=pr&token=41784B23TS&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp)](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1583?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp) ```diff @@ Coverage Diff @@ ## master #1583 +/- ## ========================================== - Coverage 36.29% 36.28% -0.02% ========================================== Files 420 420 Lines 183150 183150 ========================================== - Hits 66482 66463 -19 - Misses 108605 108619 +14 - Partials 8063 8068 +5 ``` [see 19 files with indirect coverage changes](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1583/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp)
gbjk commented 1 month ago

Not a fault of our implementation that no one wants to block trade. 90 days is serviceable, but I'd also accept the removal of the assert or a change to NotEmpty

Agreed. I considered NotEmpty. Wanted to keep some sanity validation in there, though.