Bug #5233

[Tests] Eliminate system globals in test suites

Added by Tom Clegg about 7 years ago. Updated 2 months ago.

Assigned To:
Target version:
Start date:
Due date:
% Done:


Estimated time:
Story points:


It should be possible to run jenkins/run-tests.sh on two source trees concurrently on the same machine (using either the same or different login accounts).

Known problems to fix:
  • Default test config uses /tmp/crunch_refresh_trigger which causes races and permission problems, depending on whether concurrent tests are run with different logins.
  • Test suite removes the whole $HOME/.cache/arvados/discovery/ dir, but the config code assumes nobody would ever do this: it calls mkdir and then tells httplib2 to use it as a cache dir, which crashes if the dir doesn't exist. It should just remove its own discovery docs, not the entire dir. (Removing all cached docs and leaving the directory alive wouldn't be as elegant, but should work fine: the cache user should already be immune to races over individual files.)
  • websocket_runner still uses a hard coded port 3002. It should do something like find_available_port() in source:sdk/python/tests/run_test_server.py#L97 instead.
Stuff that already works:
  • run-test-servers.py uses random port numbers (from #3021). This seems to be working well.
  • Each run-tests process needs a dedicated database: you just need to put a different database name (and optionally a different db user) in config/database.yml.
Not in scope:
  • Running more than one test suite at a time in the same working tree (this will cause all kinds of problems with packaging tools and pidfiles that surely aren't worth taking on).
  • Avoiding leaking global state from $HOME/.config into tests.


#1 Updated by Tom Clegg about 7 years ago

  • Description updated (diff)
  • Category set to Tests

#2 Updated by Ward Vandewege 10 months ago

  • Target version deleted (Arvados Future Sprints)

#3 Updated by Peter Amstutz 2 months ago

  • Status changed from New to Closed

Also available in: Atom PDF