Commit 236739e4 authored by Jason Madden's avatar Jason Madden

Some test tweaks.

parent 007587aa
...@@ -9,8 +9,8 @@ from unittest import SkipTest ...@@ -9,8 +9,8 @@ from unittest import SkipTest
import socket import socket
import ssl import ssl
import greentest
from greentest import DEFAULT_XPC_SOCKET_TIMEOUT from greentest import DEFAULT_XPC_SOCKET_TIMEOUT
from greentest import main
from greentest import util from greentest import util
from greentest import params from greentest import params
...@@ -101,6 +101,7 @@ class Test_wsgiserver_ssl(Test_wsgiserver): ...@@ -101,6 +101,7 @@ class Test_wsgiserver_ssl(Test_wsgiserver):
ssl_ctx = ssl._create_unverified_context() ssl_ctx = ssl._create_unverified_context()
@greentest.skipOnLibuvOnCIOnPyPy("Timing issues sometimes lead to a connection refused")
class Test_webproxy(Test_wsgiserver): class Test_webproxy(Test_wsgiserver):
server = 'webproxy.py' server = 'webproxy.py'
...@@ -136,4 +137,4 @@ class Test_webproxy(Test_wsgiserver): ...@@ -136,4 +137,4 @@ class Test_webproxy(Test_wsgiserver):
if __name__ == '__main__': if __name__ == '__main__':
main() greentest.main()
from __future__ import print_function from __future__ import print_function
from gevent import core from gevent import config
from greentest import TestCase from greentest import TestCase
from greentest import main from greentest import main
...@@ -13,11 +13,14 @@ class Test(TestCase): ...@@ -13,11 +13,14 @@ class Test(TestCase):
def setUp(self): def setUp(self):
self.called = [] self.called = []
self.loop = core.loop(default=True) self.loop = config.loop(default=True)
self.timer = self.loop.timer(0.001, repeat=self.repeat) self.timer = self.loop.timer(0.001, repeat=self.repeat)
def tearDown(self): def tearDown(self):
self.timer.close() self.timer.close()
self.loop.destroy()
self.timer = None
self.loop = None
def f(self, x=None): def f(self, x=None):
self.called.append(1) self.called.append(1)
......
...@@ -25,6 +25,7 @@ if getattr(resolver, 'pool', None) is not None: ...@@ -25,6 +25,7 @@ if getattr(resolver, 'pool', None) is not None:
from greentest.sysinfo import RESOLVER_NOT_SYSTEM from greentest.sysinfo import RESOLVER_NOT_SYSTEM
from greentest.sysinfo import RESOLVER_DNSPYTHON from greentest.sysinfo import RESOLVER_DNSPYTHON
from greentest.sysinfo import RESOLVER_ARES
from greentest.sysinfo import PY2 from greentest.sysinfo import PY2
...@@ -444,6 +445,8 @@ class SanitizedHostsFile(HostsFile): ...@@ -444,6 +445,8 @@ class SanitizedHostsFile(HostsFile):
continue continue
yield name, addr yield name, addr
@greentest.skipIf(greentest.RUNNING_ON_TRAVIS and RESOLVER_ARES,
"This sometimes randomly fails on Travis with ares, beginning Feb 13, 2018")
class TestEtcHosts(TestCase): class TestEtcHosts(TestCase):
MAX_HOSTS = os.getenv('GEVENTTEST_MAX_ETC_HOSTS', 10) MAX_HOSTS = os.getenv('GEVENTTEST_MAX_ETC_HOSTS', 10)
......
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