Commit 633a7e52 authored by Jason Madden's avatar Jason Madden

Broaden the skip, seen on Travis occassionally. Cannot reproduce.

parent af8e9dac
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
from __future__ import absolute_import, print_function, division from __future__ import absolute_import, print_function, division
import sys import sys
import functools
import unittest import unittest
from gevent.util import dump_stacks from gevent.util import dump_stacks
...@@ -93,3 +94,17 @@ if sysinfo.RUNNING_ON_CI or (sysinfo.PYPY and sysinfo.WIN): ...@@ -93,3 +94,17 @@ if sysinfo.RUNNING_ON_CI or (sysinfo.PYPY and sysinfo.WIN):
if sysinfo.LIBUV: if sysinfo.LIBUV:
reraiseFlakyTestRaceConditionLibuv = reraiseFlakyTestRaceCondition reraiseFlakyTestRaceConditionLibuv = reraiseFlakyTestRaceCondition
reraiseFlakyTestTimeoutLibuv = reraiseFlakyTestTimeout reraiseFlakyTestTimeoutLibuv = reraiseFlakyTestTimeout
def reraises_flaky_timeout(exc_kind):
def wrapper(f):
@functools.wraps(f)
def m(*args):
try:
f(*args)
except exc_kind:
reraiseFlakyTestTimeout()
return m
return wrapper
...@@ -42,6 +42,7 @@ _socket.socket = Socket ...@@ -42,6 +42,7 @@ _socket.socket = Socket
import greentest import greentest
from gevent import monkey; monkey.patch_all() from gevent import monkey; monkey.patch_all()
from greentest import flaky
from pprint import pformat from pprint import pformat
try: try:
...@@ -137,16 +138,17 @@ def run_and_check(run_client): ...@@ -137,16 +138,17 @@ def run_and_check(run_client):
raise AssertionError('server should be dead by now') raise AssertionError('server should be dead by now')
@greentest.skipOnAppVeyor("Often fail with timeouts or force closed connections; not sure why.") @greentest.skipOnCI("Often fail with timeouts or force closed connections; not sure why.")
@greentest.skipOnPyPy3OnCI("Often fails with timeouts; not sure why.")
class Test(greentest.TestCase): class Test(greentest.TestCase):
__timeout__ = 10 __timeout__ = greentest.LARGE_TIMEOUT
@flaky.reraises_flaky_timeout(socket.timeout)
def test_clean_exit(self): def test_clean_exit(self):
run_and_check(True) run_and_check(True)
run_and_check(True) run_and_check(True)
@flaky.reraises_flaky_timeout(socket.timeout)
def test_timeout_exit(self): def test_timeout_exit(self):
run_and_check(False) run_and_check(False)
run_and_check(False) run_and_check(False)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment