#6362 SVN tests fail due to random diff ordering

asf_release_1.0.0
closed
nobody
42cc (408)
General
2015-02-25
2013-06-12
Dave Brondsema
No

These fail on some systems, pass on other systems. Known to fail on travis-ci and Apache Jenkins service

FAIL: test_diff_create_path (forgesvn.tests.model.test_repository.TestSVNRepo)

Traceback (most recent call last):

File "/home/travis/build/brondsem/incubator-allura/ForgeSVN/forgesvn/tests/model/test_repository.py", line 255, in test_diff_create_path

'/a/b/c/hello.txt'], total=4))

AssertionError: {'copied': [], 'total': 4, 'removed': [], 'added': [u'/a/b/c', u'/a/b/c/hello.txt', u'/a', u'/a/b'], 'changed': []} != {'total': 4, 'copied': [], 'removed': [], 'added': ['/a', '/a/b', '/a/b/c', '/a/b/c/hello.txt'], 'changed': []}

FAIL: test_paged_diffs (forgesvn.tests.model.test_repository.TestSVNRepo)

Traceback (most recent call last):

File "/home/travis/build/brondsem/incubator-allura/ForgeSVN/forgesvn/tests/model/test_repository.py", line 236, in test_paged_diffs

self.assertEqual(expected, actual)

AssertionError: {'total': 4, 'copied': [], 'removed': [], 'added': ['/a/b', '/a/b/c'], 'changed': []} != {'copied': [], 'total': 4, 'removed': [], 'added': [u'/a/b/c/hello.txt', u'/a'], 'changed': []}

Related

Tickets: #6362

Discussion

  • Dave Brondsema
    Dave Brondsema
    2013-06-18

    • labels: --> 42cc
     
    • status: open --> in-progress
     
  • AFAIR, we had a similar problem with these tests on our internal build system. It turned out that python2.6 were causing these failures (on 2.7 all worked fine). Seems like some changes in dict's internals were implemented between this two versions.

    We'll try to refactor those to be order-agnostic.

    Created #378: [#6362] SVN tests fail due to random diff ordering (1cp)

     

    Related

    Tickets: #6362

    • status: in-progress --> code-review
     
  • Closed #378. je/42cc_6362

    Actually, I was wrong about python2.6. On 2.6 tests doesn't run at all, because some of the Allura code uses OrderedDict, which was introduced in 2.7 only.

    Though, I've managed to reproduce those test failures on my local machine. I've run those particular tests 10 times in a row, and both of them failed at least once.

    Like this:

    $ for i in 1 2 3 4 5 6 7 8 9 10
    do
    nosetests forgesvn.tests.model.test_repository:TestSVNRepo.test_paged_diffs
    nosetests forgesvn.tests.model.test_repository:TestSVNRepo.test_diff_create_path
    done
    

    After fix tests pass 10 from 10 times, so I think it won't happen again.

     
  • Dave Brondsema
    Dave Brondsema
    2013-06-26

    • QA: Dave Brondsema
     
  • Dave Brondsema
    Dave Brondsema
    2013-06-26

    • status: code-review --> closed
    • Milestone: forge-backlog --> forge-jun-28