def test_threaded_access():
    """Starts multiple threads to perform store and get calls randomly."""
    ## Doesn't this test look like a DOS attack on Synapse?
    ## Maybe it should be called explicity...
    
    # Suppress most of the output from the many REST calls
    #   Otherwise, it flood the screen with irrelevant data upon error
    requests_log = logging.getLogger("requests")
    requests_originalLevel = requests_log.getEffectiveLevel()
    requests_log.setLevel(logging.WARNING)
    
    print("Starting threads")
    store_thread = wrap_function_as_child_thread(thread_keep_storing_one_File)
    get_thread = wrap_function_as_child_thread(thread_get_files_from_Project)
    update_thread = wrap_function_as_child_thread(thread_get_and_update_file_from_Project)
    thread.start_new_thread(store_thread, ())
    thread.start_new_thread(store_thread, ())
    thread.start_new_thread(store_thread, ())
    thread.start_new_thread(store_thread, ())
    thread.start_new_thread(get_thread, ())
    thread.start_new_thread(get_thread, ())
    thread.start_new_thread(get_thread, ())
    thread.start_new_thread(update_thread, ())
    thread.start_new_thread(update_thread, ())
    thread.start_new_thread(update_thread, ())
    
    # Give the threads some time to wreak havoc on the cache
    time.sleep(20)
    
    print("Terminating threads")
    syn.test_keepRunning = False
    while syn.test_threadsRunning > 0:
        time.sleep(1)

    # Reset the requests logging level
    requests_log.setLevel(requests_originalLevel)
        
    collect_errors_and_fail()
  
#############
## Helpers ##
#############
dataset/ETHPy150Open Sage-Bionetworks/synapsePythonClient/tests/integration/test_caching.py/test_threaded_access/original