##// END OF EJS Templates
Merge pull request #1312 from minrk/hb...
Merge pull request #1312 from minrk/hb two small heartbeat changes: * flush outgoing heartbeats (notebook and parallel): - Prevents mismatch between heartbeat timer and actual heartbeat send/recv events. * relax default heartbeat period in IPython.parallel to 3s from 1s - Matches heartbeats elsewhere. 3s should be extremely conservative, as most heartbeat responses are O(1ms) unless there's a bug in our code (like the above flush and previously-discovered GIL issues). closes #1304

File last commit:

r4018:9950e71b
r5954:1487f2f1 merge
Show More
test_mongodb.py
42 lines | 1.1 KiB | text/x-python | PythonLexer
"""Tests for mongodb backend
Authors:
* Min RK
"""
#-------------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Imports
#-------------------------------------------------------------------------------
from nose import SkipTest
from pymongo import Connection
from IPython.parallel.controller.mongodb import MongoDB
from . import test_db
try:
c = Connection()
except Exception:
c=None
class TestMongoBackend(test_db.TestDictBackend):
"""MongoDB backend tests"""
def create_db(self):
try:
return MongoDB(database='iptestdb', _connection=c)
except Exception:
raise SkipTest("Couldn't connect to mongodb")
def teardown(self):
if c is not None:
c.drop_database('iptestdb')