Getting error in the test 'integration.integration_test_Entity.test_get_with_downloadLocation_and_ifcollision', but spuriously, both on Travis and local. Locally, it fails ~25% of the time.
Added a bit of debugging output:
Ran test 20 times:
I think there is something wrong with the cache. Every time the test fails, cached_file_path = None and when it passes cached_file_path is a valid directory. The test is failing because when cached_file_path is None, the client thinks that a cached file does not exist and therefore redownloads the file, changing the file's last modified value.
looks like the code for my tests were updating and but the code for the client wasn't which is why it was passing locally.
I put the test to sleep for 15 seconds and then checked the values of what was being compared. Locally (on a Mac), the the test passes and the time is the same. However on Travis, there is a difference of about 15 seconds between the timestamps and the test fails. I'm guessing that the syn.get() method may have incorrect behavior (always overwrites instead of keeping the file) when ifcollision="keep.local" but some optimization on Mac is making it not overwrite the file. I'll need to verify the behavior on Linux (which Travis uses) and also windows.