tests/integration/integration_test_Entity.py:test_get_with_downloadLocation_and_ifcollision AssertionError

Description

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:

Environment

None

Activity

Show:
Ziming Dong
April 5, 2017, 8:17 PM

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.

Ziming Dong
April 5, 2017, 8:35 PM

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.

Ziming Dong
April 5, 2017, 9:43 PM

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.

Kenneth Daily
June 2, 2017, 9:41 PM

Ran test 20 times:

No failures!

Assignee

Ziming Dong

Reporter

Kenneth Daily

Labels

None

Validator

Kenneth Daily

Development Area

None

Release Version History

None

Fix versions

Priority

Major
Configure