NOAA-OWP / hydrotools

Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data.
Other
53 stars 12 forks source link

"Run Slow Unit Tests" Action has been failing for some time #217

Closed aaraney closed 1 year ago

aaraney commented 1 year ago

As @jarq6c mentioned in #216, the "Run Slow Unit Tests" Action has been failing for some time. I did a little bit of digging and the issue is twofold. First, the svi_client is missing a testing dependency, pytest-aiohttp. We use this dependecny in _restclient and nwis_client to provide an asyncio loop to tests. This is the cause of the RuntimeError: There is no current event loop in thread 'MainThread'. errors in the slow unit tests. Second, in general the svi_client integration tests are a little brittle. We end up hitting an esri feature server repeatedly upwards of 600 times. If requests are made too quickly, the server just rejects the requests.

jarq6c commented 1 year ago

Do we need to hit an ESRI server 600 times?

aaraney commented 1 year ago

@jarq6c, no and that would remedy this. I think just hitting each endpoint is enough.