Eliminate file listing ordering assumptions.

Review Request #4121 - Created July 24, 2016 and submitted

Information
John Sirois
pants
jsirois/IsolatedProcessTest/fix-xplatform
3725
27f10c8...
Reviewers
pants-reviews
nhoward_tw
Previously the fixed tests would fail on machines that listed dirents
differently.

 tests/python/pants_test/engine/test_isolated_process.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Previously on my machine:

...
tests/python/pants_test/engine/test_isolated_process.py:220: in assert_archive_files
     [tar_info.path for tar_info in tar.getmembers()])
 E   AssertionError: Lists differ: [u'fs_test/a/b/1.txt', u'fs_te... != ['fs_test/a/b/2', 'fs_test/a/b...
 E   
 E   First differing element 0:
 E   u'fs_test/a/b/1.txt'
 E   'fs_test/a/b/2'
 E   
 E   - [u'fs_test/a/b/1.txt', u'fs_test/a/b/2']
 E   + ['fs_test/a/b/2', 'fs_test/a/b/1.txt']
  IsolatedProcessTest.test_integration_concat_with_snapshot_subjects_test
...
>     self.assertEqual(Concatted('one\ntwo\n'), concatted)
 E     AssertionError: Concatted(value=u'one\ntwo\n') != Concatted(value='two\none\n')

 tests/python/pants_test/engine/test_isolated_process.py:151: AssertionError
...

Now green.

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/147055265

John Sirois
Eric Ayers
Nick Howard (Twitter)
John Sirois
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit 2814f1519a6fe7615b4950f407194eef5c9f208e
Author: John Sirois <john.sirois@gmail.com>
Date:   Mon Jul 25 10:26:37 2016 -0600

    Eliminate file listing ordering assumptions.
    
    Previously the fixed tests would fail on machines that listed dirents
    differently.
    
    Testing Done:
    Previously on my machine:
    ```
    ...
    tests/python/pants_test/engine/test_isolated_process.py:220: in assert_archive_files
         [tar_info.path for tar_info in tar.getmembers()])
     E   AssertionError: Lists differ: [u'fs_test/a/b/1.txt', u'fs_te... != ['fs_test/a/b/2', 'fs_test/a/b...
     E
     E   First differing element 0:
     E   u'fs_test/a/b/1.txt'
     E   'fs_test/a/b/2'
     E
     E   - [u'fs_test/a/b/1.txt', u'fs_test/a/b/2']
     E   + ['fs_test/a/b/2', 'fs_test/a/b/1.txt']
      IsolatedProcessTest.test_integration_concat_with_snapshot_subjects_test
    ...
    >     self.assertEqual(Concatted('one\ntwo\n'), concatted)
     E     AssertionError: Concatted(value=u'one\ntwo\n') != Concatted(value='two\none\n')
    
     tests/python/pants_test/engine/test_isolated_process.py:151: AssertionError
    ...
    ```
    
    Now green.
    
    CI went green here:
      https://travis-ci.org/pantsbuild/pants/builds/147055265
    
    Bugs closed: 3725
    
    Reviewed at https://rbcommons.com/s/twitter/r/4121/
Loading...