eshad / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

Problems with http requests (couchdb) #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following script will reproduce the problem:

$ cat test_couchdb.py 
import couchdb

server = couchdb.Server()
works, fails = 0,0
for i in range(100):
    dbname = "test%d" % i
    db = server.create(dbname)
    try:
        db['test_doc'] = { "aha":"ehe" }
        works += 1
    except couchdb.client.ResourceConflict:
        fails += 1
    server.delete(dbname)

print '=' * 50
print 'Totals: '
print 'Success: %d' % works
print 'Fails: %d' % fails

Expected output of the script (the one I get using httplib2==0.4.0):

$ python test_creation.py 
==================================================
Totals: 
Success: 100
Fails: 0

Actual output (using httplib2==0.5.0):

$ python test_creation.py 
==================================================
Totals: 
Success: 4
Fails: 96

What version of the product are you using? On what operating system?
httplib2, getting it through easy_install. Tried in both Ubuntu and OSX,
same result.

Original issue reported on code.google.com by santiycr on 27 Aug 2009 at 7:58

GoogleCodeExporter commented 9 years ago
I believe this is a duplicate of issue 67[1].

[1]: http://code.google.com/p/httplib2/issues/detail?id=67

Original comment by benblasd...@gmail.com on 9 Nov 2009 at 6:35

GoogleCodeExporter commented 9 years ago
Probably it is, think that this one was created before #67, but as soon as it is
corrected, it can be closed without problems

Original comment by santiycr on 9 Nov 2009 at 9:25

GoogleCodeExporter commented 9 years ago

Original comment by joe.gregorio@gmail.com on 16 Nov 2009 at 4:07