Closed bh2smith closed 1 year ago
What is strange about the logs is
AttributeError: 'AsyncDuneClient' object has no attribute 'close_session'. Did you mean: '_create_session'
because it is now renamed to disconnect (to be consistent with connect) and e.g. https://github.com/cowprotocol/dune-client/blob/main/dune_client/client_async.py#L69 uses it. yet the test with async with fails...
however, i see that i forgot to rename the function in the tests https://github.com/cowprotocol/dune-client/blob/main/tests/e2e/test_async_client.py#L45
might be a reason why it fails on CI and work locally when unit tests are run.
As for the Python version, I think it should be >=3.8.
Right - I hadn't pulled main. trying again.
https://github.com/cowprotocol/dune-client/pull/42 Did a PR with fixes
Accidentally closed #42 😅 #43 is the new one without conflicts
Alright @eliseygusev - there is something wrong with all of this and I don't have time to keep trying to debug it. I suspect that this client is pinging the URL way more frequently that is specified in the "ping_frequency".
But the failing tests are in sync_client. I think this might be the artifact of running a lot of tests at once (since this PR added some more) and Dune rate limits those after certain point. I guess I can try adding sleeps after the requests, this would make tests run longer but lessen probability of getting "Too many requests"
Right! Then maybe I will put some sleep between tests in there. Good point.
Actually. I think maybe some of these tests are redundant. Maybe we can just have one async test to demonstrate refresh (which captures almost all the routes anyway. If you don't mind I'm going to cut out some tests from async.
Yeah, thats true. I don't mind cutting some of those as well.
Closes #40 (hopefully)