diff --git a/build.yaml b/build.yaml index 2cb0fc4f..6169b58a 100644 --- a/build.yaml +++ b/build.yaml @@ -20,14 +20,14 @@ schedules: - python: [3.4, 3.6] - cassandra: ['2.0', '2.1', '3.0'] - nightly_libev: + weekly_libev: schedule: weekly branches: include: [master] env_vars: | EVENT_LOOP_MANAGER='libev' - nightly_gevent: + weekly_gevent: schedule: weekly branches: include: [master] @@ -35,23 +35,23 @@ schedules: EVENT_LOOP_MANAGER='gevent' matrix: exclude: - - python: [3.4, 3.6] + - python: [3.4, 3.5, 3.6] - nightly_eventlet: + weekly_eventlet: schedule: weekly branches: include: [master] env_vars: | EVENT_LOOP_MANAGER='eventlet' - nightly_async: + weekly_async: schedule: weekly branches: include: [master] env_vars: | EVENT_LOOP_MANAGER='async' - nightly_twister: + weekly_twister: schedule: weekly branches: include: [master] @@ -63,19 +63,22 @@ python: - 3.4 - 3.5 - 3.6 - + os: - ubuntu/trusty64 + cassandra: - '2.0' - '2.1' - '2.2' - '3.0' - '3.11' + env: CYTHON: - CYTHON - NO_CYTHON + build: - script: | export JAVA_HOME=$CCM_JAVA_HOME @@ -85,6 +88,7 @@ build: pip install git+https://github.com/pcmanus/ccm.git # Install dependencies sudo apt-get install -y libev4 libev-dev + pip install -r test-requirements.txt pip install nose-ignore-docstring FORCE_CYTHON=False @@ -99,6 +103,7 @@ build: python setup.py build_ext --inplace --no-cython fi + echo "Running with event loop manager: $EVENT_LOOP_MANAGER" echo "==========RUNNING CQLENGINE TESTS==========" EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER CASSANDRA_VERSION=$CCM_CASSANDRA_VERSION VERIFY_CYTHON=$FORCE_CYTHON nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=cqle_results.xml tests/integration/cqlengine/ || true diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index b39cd887..ad5d1da3 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -13,26 +13,26 @@ # limitations under the License. import os -from cassandra.io.geventreactor import GeventConnection -from cassandra.io.libevreactor import LibevConnection -from cassandra.io.asyncorereactor import AsyncoreConnection -from cassandra.io.eventletreactor import EventletConnection -from cassandra.io.twistedreactor import TwistedConnection - EVENT_LOOP_MANAGER = os.getenv('EVENT_LOOP_MANAGER', "libev") if EVENT_LOOP_MANAGER == "gevent": import gevent.monkey gevent.monkey.patch_all() + from cassandra.io.geventreactor import GeventConnection connection_class = GeventConnection elif EVENT_LOOP_MANAGER == "eventlet": from eventlet import monkey_patch monkey_patch() + + from cassandra.io.eventletreactor import EventletConnection connection_class = EventletConnection elif EVENT_LOOP_MANAGER == "async": + from cassandra.io.asyncorereactor import AsyncoreConnection connection_class = AsyncoreConnection elif EVENT_LOOP_MANAGER == "twisted": + from cassandra.io.twistedreactor import TwistedConnection connection_class = TwistedConnection else: + from cassandra.io.libevreactor import LibevConnection connection_class = LibevConnection from cassandra.cluster import Cluster