[ARVADOS] updated: d5f8e84b64d3ad294db793fb99f5b45c3250d5d3

Git user git at public.curoverse.com
Wed Jul 20 17:18:16 EDT 2016


Summary of changes:
 sdk/python/tests/run_test_server.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

       via  d5f8e84b64d3ad294db793fb99f5b45c3250d5d3 (commit)
      from  7926ff7028d577a1c77eab0c8bd94d3959146b1a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d5f8e84b64d3ad294db793fb99f5b45c3250d5d3
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Jul 20 17:14:47 2016 -0400

    9639: Delete all cached discovery docs, but do not delete the cache directory.
    
    refs #9639

diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index 8f2d440..45cc3ca 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -4,6 +4,7 @@ from __future__ import print_function
 import argparse
 import atexit
 import errno
+import glob
 import httplib2
 import os
 import pipes
@@ -12,8 +13,8 @@ import re
 import shutil
 import signal
 import socket
-import subprocess
 import string
+import subprocess
 import sys
 import tempfile
 import time
@@ -213,8 +214,14 @@ def run(leave_running_atexit=False):
     """
     global my_api_host
 
-    # Delete cached discovery document.
-    shutil.rmtree(arvados.http_cache('discovery'))
+    # Delete cached discovery documents.
+    #
+    # This will clear cached docs that belong to other processes (like
+    # concurrent test suites) even if they're still running. They should
+    # be able to tolerate that.
+    for fn in glob.glob(os.path.join(arvados.http_cache('discovery'),
+                                     '*,arvados,v1,rest,*')):
+        os.unlink(fn)
 
     pid_file = _pidfile('api')
     pid_file_ok = find_server_pid(pid_file, 0)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list