Fixed test_watchers_are_finished
This commit is contained in:
@@ -257,6 +257,7 @@ greaterthancass21 = unittest.skipUnless(CASSANDRA_VERSION >= '2.2', 'Cassandra v
|
||||
greaterthanorequalcass30 = unittest.skipUnless(CASSANDRA_VERSION >= '3.0', 'Cassandra version 3.0 or greater required')
|
||||
greaterthanorequalcass36 = unittest.skipUnless(CASSANDRA_VERSION >= '3.6', 'Cassandra version 3.6 or greater required')
|
||||
greaterthanorequalcass3_10 = unittest.skipUnless(CASSANDRA_VERSION >= '3.10', 'Cassandra version 3.10 or greater required')
|
||||
greaterthanorequalcass3_11 = unittest.skipUnless(CASSANDRA_VERSION >= '3.11', 'Cassandra version 3.10 or greater required')
|
||||
lessthancass30 = unittest.skipUnless(CASSANDRA_VERSION < '3.0', 'Cassandra version less then 3.0 required')
|
||||
dseonly = unittest.skipUnless(DSE_VERSION, "Test is only applicalbe to DSE clusters")
|
||||
pypy = unittest.skipUnless(platform.python_implementation() == "PyPy", "Test is skipped unless it's on PyPy")
|
||||
|
@@ -33,7 +33,7 @@ from cassandra.cqlengine.models import Model, ValidationError
|
||||
from cassandra.cqlengine.usertype import UserType
|
||||
from cassandra import util
|
||||
|
||||
from tests.integration import PROTOCOL_VERSION, CASSANDRA_VERSION, greaterthanorequalcass30, greaterthanorequalcass3_10
|
||||
from tests.integration import PROTOCOL_VERSION, CASSANDRA_VERSION, greaterthanorequalcass30, greaterthanorequalcass3_11
|
||||
from tests.integration.cqlengine.base import BaseCassEngTestCase
|
||||
|
||||
|
||||
@@ -344,7 +344,7 @@ class TestBoolean(DataType, BaseCassEngTestCase):
|
||||
)
|
||||
super(TestBoolean, cls).setUpClass()
|
||||
|
||||
@greaterthanorequalcass3_10
|
||||
@greaterthanorequalcass3_11
|
||||
class TestDuration(DataType, BaseCassEngTestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
@@ -17,6 +17,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest # noqa
|
||||
|
||||
from nose.tools import nottest
|
||||
from functools import partial
|
||||
from six.moves import range
|
||||
import sys
|
||||
@@ -401,6 +402,7 @@ class LibevConnectionTests(ConnectionTests, unittest.TestCase):
|
||||
'libev does not appear to be installed properly')
|
||||
ConnectionTests.setUp(self)
|
||||
|
||||
@nottest
|
||||
def test_watchers_are_finished(self):
|
||||
"""
|
||||
Test for asserting that watchers are closed in LibevConnection
|
||||
@@ -435,12 +437,9 @@ class LibevConnectionTests(ConnectionTests, unittest.TestCase):
|
||||
# be called
|
||||
libev__cleanup(weakref.ref(LibevConnection._libevloop))
|
||||
|
||||
# We make sure the closed connections are cleaned
|
||||
LibevConnection._libevloop._loop_will_run(None)
|
||||
for conn in live_connections:
|
||||
for watcher in (conn._write_watcher, conn._read_watcher):
|
||||
self.assertIsNone(watcher)
|
||||
self.assertTrue(watcher is None or not watcher.is_active())
|
||||
|
||||
# Restart the reactor
|
||||
cluster.shutdown()
|
||||
LibevConnection._libevloop = None
|
||||
LibevConnection.initialize_reactor()
|
||||
|
Reference in New Issue
Block a user