Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

single test failure using Postgression #1082

Closed
chadwhitacre opened this issue Jun 25, 2013 · 4 comments
Closed

single test failure using Postgression #1082

chadwhitacre opened this issue Jun 25, 2013 · 4 comments

Comments

@chadwhitacre
Copy link
Contributor

Reticketing from #1078. I'm getting this error when using a Postgression instance (I don't get it using a local db):

==============================================================================
./env/bin/swaddle tests/env ./env/bin/nosetests ./tests/
............................F........................................................................................................................................................................
======================================================================
FAIL: test_start_zero_out_and_get_participants (test_billing_payday.TestBillingPayday)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/whit537/personal/gittip/www.gittip.com/env/lib/python2.7/site-packages/mock.py", line 1224, in patched
    return func(*args, **keywargs)
  File "/Users/whit537/personal/gittip/www.gittip.com/tests/test_billing_payday.py", line 534, in test_start_zero_out_and_get_participants
    assert_equals(len(participants), 1)
AssertionError: 0 != 1

----------------------------------------------------------------------
Ran 197 tests in 561.099s

FAILED (failures=1)
make: *** [test] Error 1
@chadwhitacre
Copy link
Contributor Author

I went to see if I can reproduce this again and Postgression is down. :-/

@zbynekwinkler
Copy link
Contributor

Postgression is not down now but the test run so slowly that it is almost not usable. From the looks I expect the whole test suite will take about 30min to 1h.

@zbynekwinkler
Copy link
Contributor

I don't know how long it has run (in the morning it was done :)) but I have two failures, both related to how slow postgression is:

______________________________ Tests.test_claiming_participant ______________________________

self = <test_participant.Tests testMethod=test_claiming_participant>

    def test_claiming_participant(self):
        now = datetime.datetime.now(pytz.utc)
        self.participant.set_as_claimed()
        actual = self.participant.claimed_time - now
        expected = datetime.timedelta(seconds=0.1)
>       assert actual < expected
E       AssertionError: assert datetime.timedelta(0, 0, 215623) < datetime.timedelta(0, 0, 100000)

../tests/test_participant.py:214: AssertionError
____________________________ Tests.test_gais_gets_age_in_seconds ____________________________

self = <test_participant.Tests testMethod=test_gais_gets_age_in_seconds>

    def test_gais_gets_age_in_seconds(self):
        now = datetime.datetime.now(pytz.utc)
        alice = self.make_participant('alice', claimed_time=now)
        actual = alice.get_age_in_seconds()
>       assert 0 < actual < 1
E       AssertionError: assert 1.512967 < 1

../tests/test_participant.py:509: AssertionError

@chadwhitacre
Copy link
Contributor Author

Okay, good enough to close this ticket. Let's pick up discussing Postgression on #1552.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants