Adds Tynd envs for Travis

and fixes timeout tests
This commit is contained in:
Ilan Steemers
2015-09-04 15:16:30 +02:00
parent e76e65640b
commit 3524ad2dee
2 changed files with 13 additions and 1 deletions
+8
View File
@@ -1,3 +1,6 @@
from time import sleep
def countdown(n):
while n > 0:
n -= 1
@@ -22,6 +25,11 @@ def word_multiply(x, word=''):
return len(word) * x
def count_forever():
while True:
sleep(0.5)
def get_task_name(task):
return task.name
+5 -1
View File
@@ -37,7 +37,11 @@ def test_redis():
def test_disque():
Conf.DISQUE_NODES = ['127.0.0.1:7711']
# Either local disque or Heroku Tynd
Conf.DISQUE_NODES = os.getenv('TYND_DISQUE_NODES', ['127.0.0.1:7711'])
if os.getenv('TYND_DISQUE_AUTH', False):
Conf.DISQUE_AUTH = os.environ['TYND_DISQUE_AUTH']
# check broker
broker = get_broker(list_key='disque_test')
assert broker.ping() is True
assert broker.info() is not None