add a regression test (remote-only)
@@ -677,3 +677,23 @@ def test_staging_stacking(dataarchive_url):
alma.stage_data(['uid://A001/X13d5/X1d', 'uid://A002/X3216af/X31',
'uid://A001/X12a3/X240'])
+
+
+@pytest.mark.remote_data
+@pytest.mark.skipif("SKIP_SLOW", "Huge data file download")
+@pytest.mark.parametrize('dataarchive_url', _test_url_list)
+def test_big_download_regression(dataarchive_url):
+ """
+ Regression test for #2020/#2021 - this download fails if logging tries to
+ load the whole data file into memory.
+ """
+ result = Alma.query({'project_code':'2013.1.01365.S'})
+ uids = np.unique(result['member_ous_uid'])
+ files = Alma.get_data_info(uids)
+
+ #we may need to change the cache dir for this to work on testing machines?
+ # savedir='/big/data/path/'
+ # Alma.cache_dir=savedir
+
+ # this is a big one that fails
+ Alma.download_files([files['access_url'][3]])
