summaryrefslogtreecommitdiff
path: root/funtests/disabled_basic_get_leak.py
blob: 533973abe7e567b541b66dc7dda449b2116b6749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os

from librabbitmq import Connection

x = Connection()
c = x.channel()
c.exchange_declare('getmem')
c.queue_declare('getmem')
c.queue_bind('getmem', 'getmem', 'getmem')

from time import sleep

for i in xrange(10000):
    c.basic_publish('foo', exchange='getmem', routing_key='getmem')
    if not i % 1000:
        print('sent %s' % i)

for i in xrange(10000):
    assert c.basic_get('getmem', no_ack=True)
    if not i % 1000:
        print(i)
        os.system('sh -c "ps auxww | grep %d | grep -v grep "' % os.getpid())