Skip to content

Commit

Permalink
Comment fix and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Oct 27, 2023
1 parent 8abc404 commit 5ff767c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tests/integration/synapseclient/core/test_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def child_thread():

try:
function(*args, **kwargs)
except Exception as ex:
except Exception:
syn.test_errors.put(traceback.format_exc())

syn.test_runCountMutex.acquire()
Expand Down Expand Up @@ -216,12 +216,14 @@ def sleep_for_a_bit() -> int:
return time_to_sleep


# When running with multiple threads it can lock up and do nothing until pipeline is killed at 6hrs
@func_set_timeout(20)
def get_all_ids_from_Project(syn: Synapse, project: Project):
"""Fetches all currently available Synapse IDs from the parent Project."""
return [result["id"] for result in syn.getChildren(project.id)]


# When running with multiple threads it can lock up and do nothing until pipeline is killed at 6hrs
@func_set_timeout(20)
def store_catch_412_HTTPError(syn: Synapse, entity: Entity):
"""Returns the stored Entity if the function succeeds or None if the 412 is caught."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_multipart_upload_big_string(


def _multipart_copy_test(
syn: Synapse, project: Project, schedule_for_cleanup, part_size
syn: Synapse, project: Project, schedule_for_cleanup, part_size: int
):
import logging

Expand Down
1 change: 1 addition & 0 deletions tests/integration/synapseutils/test_synapseutils_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ def test_syncFromSynapse_given_file_id(test_state):
assert file == all_files[0]


# When running with multiple threads it can lock up and do nothing until pipeline is killed at 6hrs
@func_set_timeout(120)
def execute_sync_from_synapse(*args, **kwargs):
return synapseutils.syncFromSynapse(*args, **kwargs)
3 changes: 1 addition & 2 deletions tests/integration/synapseutils/test_synapseutils_walk.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import synapseutils


# This test has a timeout and is marked with flaky. In some cases this test is running
# for 6+ hours and is killed by the time limit placed on how long the pipeline can run.
@pytest.mark.flaky(reruns=3)
def test_walk(syn, schedule_for_cleanup):
try:
Expand All @@ -20,6 +18,7 @@ def test_walk(syn, schedule_for_cleanup):
pytest.fail("test_walk timed out")


# When running with multiple threads it can lock up and do nothing until pipeline is killed at 6hrs
@func_set_timeout(120)
def execute_test_walk(syn, schedule_for_cleanup):
walked = []
Expand Down

0 comments on commit 5ff767c

Please sign in to comment.