cloudant-labs / cloudant-python

Asynchronous Cloudant / CouchDB interface for Python
http://cloudant-labs.github.io/cloudant-python/
37 stars 17 forks source link

Travis tests fail intermittently #14

Closed garbados closed 10 years ago

garbados commented 10 years ago

Eventual consistency, el oh el, amirite?

But really, nondeterministic testing is bollocks. Let's fix that.

@drsm79 @mikerhodes @BigBlueHat Any experience here?

BigBlueHat commented 10 years ago

Sadly no idea there. Any errors being output?

garbados commented 10 years ago

https://travis-ci.org/cloudant-labs/cloudant-python/builds/13545453

  1. The database test cleans up after itself, but apparently not fast enough. My working solution has been to just re-run the travis build, which usually works, but also means our tests are non-deterministic, which is gross and shitty. Why would the Travis box's CouchDB be less consistent than my local deployment?
drsm79 commented 10 years ago

Make the DB have a timestamp in the name?

garbados commented 10 years ago

Oh, that's clever. I'll see about that.

mikerhodes commented 10 years ago

Not correctly forcing your tests to be sync overall (i.e., your delete call succeeds at some point after you call delete, meaning the next test starts before you are done)?

garbados commented 10 years ago

https://github.com/cloudant-labs/cloudant-python/blob/master/test/__init__.py#L126

Calling result should cause Python to block until it downloads the entirety of the response body, per requests-futures. If requests-futures isn't correctly blocking, then @drsm79 's timestamping solution will work until we hammer out that bug.