Closed busma13 closed 5 months ago
There are a few ways that we may be able to resolve this issue:
test-sequencer
to ensure that recovery-spec
runs first.jobSpec
in recovery-spec
gets the list of IDs for assets it needs.teraslice-harness
that will create a jobSpec
that does not need to be modified by the test?I decided the best approach was to add a function to the teraslice-harness
that returns an array of IDs belonging to the "base assets" that the e2e tests autoload. recover-spec
calls this function and assigns the return value to jobSpec.assets
, ensuring that job validation only checks the assets that were autoloaded.
Adding functionality to store assets in an external storage like S3 instead of in Elasticsearch (see: #3563) has surfaced a race condition in e2e tests.
simple-spec
saves assets to theteraslice.assets_directory
cache.recovery-spec
gets the array of asset IDs needed to create ajobSpec
from the list of IDs in theteraslice.assets_directory
cache.simple-spec
can be adding an asset whilerecovery-spec
is reading all the assets in the directory.teraslice.assets_directory
, but not yet be stored in Elasticsearch.recovery-spec
gets an ID that has just been added to the cache, it will add it tojobSpec.assets
and then run validation onjobSpec
. If the validation check for the presence of the asset happens before it has been saved to ES bysimple-spec
the test will fail with an error:Failure to get assets, caused by TSError: No assets found for "2909ec5fd38466cf6276cc14ede25096f1f34ee9"