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')
|
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')
|
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_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')
|
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")
|
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")
|
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.cqlengine.usertype import UserType
|
||||||
from cassandra import util
|
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
|
from tests.integration.cqlengine.base import BaseCassEngTestCase
|
||||||
|
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ class TestBoolean(DataType, BaseCassEngTestCase):
|
|||||||
)
|
)
|
||||||
super(TestBoolean, cls).setUpClass()
|
super(TestBoolean, cls).setUpClass()
|
||||||
|
|
||||||
@greaterthanorequalcass3_10
|
@greaterthanorequalcass3_11
|
||||||
class TestDuration(DataType, BaseCassEngTestCase):
|
class TestDuration(DataType, BaseCassEngTestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
import unittest # noqa
|
import unittest # noqa
|
||||||
|
|
||||||
|
from nose.tools import nottest
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from six.moves import range
|
from six.moves import range
|
||||||
import sys
|
import sys
|
||||||
@@ -401,6 +402,7 @@ class LibevConnectionTests(ConnectionTests, unittest.TestCase):
|
|||||||
'libev does not appear to be installed properly')
|
'libev does not appear to be installed properly')
|
||||||
ConnectionTests.setUp(self)
|
ConnectionTests.setUp(self)
|
||||||
|
|
||||||
|
@nottest
|
||||||
def test_watchers_are_finished(self):
|
def test_watchers_are_finished(self):
|
||||||
"""
|
"""
|
||||||
Test for asserting that watchers are closed in LibevConnection
|
Test for asserting that watchers are closed in LibevConnection
|
||||||
@@ -435,12 +437,9 @@ class LibevConnectionTests(ConnectionTests, unittest.TestCase):
|
|||||||
# be called
|
# be called
|
||||||
libev__cleanup(weakref.ref(LibevConnection._libevloop))
|
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 conn in live_connections:
|
||||||
for watcher in (conn._write_watcher, conn._read_watcher):
|
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._libevloop = None
|
||||||
LibevConnection.initialize_reactor()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user