Skip to content

Commit

Permalink
Wrap test in 2 min timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Oct 27, 2023
1 parent 5ff767c commit 9bbba97
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/integration/synapseutils/test_synapseutils_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import time
import re
import json
from func_timeout import FunctionTimedOut, func_set_timeout

import pytest

Expand All @@ -28,6 +29,16 @@
# Add test for existing provenance but the orig doesn't have provenance
@pytest.mark.flaky(reruns=3)
def test_copy(syn: Synapse, schedule_for_cleanup):
try:
execute_test_copy(syn, schedule_for_cleanup)
except FunctionTimedOut:
syn.logger.warning("test_copy timed out")
pytest.fail("test_copy 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_copy(syn: Synapse, schedule_for_cleanup):
"""Tests the copy function"""
# Create a Project
project_entity = syn.store(Project(name=str(uuid.uuid4())))
Expand Down

0 comments on commit 9bbba97

Please sign in to comment.