'Test throttling while flushing'

def testThrottling(self):

    trManager = TransactionManager(timedelta(seconds=0), MAX_QUEUE_SIZE, THROTTLING_DELAY, max_endpoint_errors=100)
    trManager._flush_without_ioloop = True
    oneTrSize = (MAX_QUEUE_SIZE / 10)
    for i in xrange(3):
        tr = memTransaction(oneTrSize, trManager)
        trManager.append(tr)
    before = datetime.utcnow()
    trManager.flush()
    after = datetime.utcnow()
    self.assertTrue(((after - before) > ((3 * THROTTLING_DELAY) - timedelta(microseconds=100000))), ('before    =    %s    after    =    %s' % (before, after)))
