New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip NNDC/XCOM tests if databases are down #333
Conversation
@jccurtis I feel like my increasing the retries and adding a delay is ultimately a bad idea... this means up to 20 s per test, and if NNDC is down as it was in the last pipeline, the whole test suite can take an hour and a half to run! |
@jvavrek can we change the tests to use xdist and run in parallel? |
72a1055
to
5e55195
Compare
Maybe we should add a simple test (a |
With ______________________ TestCacheExceptions.test_bad_path _______________________
[gw0] linux -- Python 3.6.15 /opt/hostedtoolcache/Python/3.6.15/x64/bin/python
self = <df_cache_test.TestCacheExceptions object at 0x7f084ab[57](https://github.com/lbl-anp/becquerel/runs/5825240685?check_suite_focus=true#step:7:57)9b0>
def test_bad_path(self):
"""Test ExampleCache.check_path() exception for a bad path."""
d = ExampleCache()
d.path = "/bad/path"
with pytest.raises(CacheError):
d.check_path()
with pytest.raises(CacheError):
> d.check_file()
E Failed: DID NOT RAISE <class 'becquerel.tools.df_cache.CacheError'>
tests/df_cache_test.py:67: Failed @markbandstra can you comment? Are we perhaps getting a race condition here? |
I think that could be a race condition... it looks like setting d.filename = "/bad/path/filename.csv" right before that test. |
Now we have a It appears in macos python 3.8, 3.9, but not 3.7 Possibly related: |
Downgrading to |
Closes #332