Project

General

Profile

Actions

Bug #5233

closed

[Tests] Eliminate system globals in test suites

Added by Tom Clegg about 9 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assigned To:
-
Category:
Tests
Target version:
-
Story points:
1.0

Description

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.
Actions #1

Updated by Tom Clegg about 9 years ago

  • Description updated (diff)
  • Category set to Tests
Actions #2

Updated by Ward Vandewege over 2 years ago

  • Target version deleted (Arvados Future Sprints)
Actions #3

Updated by Peter Amstutz about 2 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF