8483811889
We intend this project's code to function both with and without eventlet monkey patching, so we should test that way too. This adds a separate test run that explicitly enables eventlet and removes the racy monkey patching that existed before. I left the eventlet-specific unit test because it's making direct calls into eventlet, so it is a somewhat different case from implicitly using monkey patched classes and I'd rather leave a redundant test than remove it and find out it covered something the others don't. Change-Id: Idbe9cdd90e9ce5e38b03ec1c20066928daa9ef00 Closes-Bug: 1367966
19 lines
703 B
Python
19 lines
703 B
Python
# Copyright 2014 Red Hat, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
import os
|
|
|
|
if os.environ.get('TEST_EVENTLET'):
|
|
import eventlet
|
|
eventlet.monkey_patch() |