test-fb-hgext-fastlog: improve robustness

Summary:
The test failed sometimes on OSX:

    --- test-fb-hgext-fastlog.t
    +++ test-fb-hgext-fastlog.t.err
    @@ -34,6 +34,7 @@
       $ hg log dir -T '{desc}\n'
       b
       a
    +  Exception in thread Thread-3 (most likely raised during interpreter shutdown): (no-eol)
       $ hg log dir -T '{desc}\n' --all
       b
       a2

The threading usage in fastlog does seem kind of risky (especially with async
Rust involved). Race condition in Py_Finalize is not at all fun. Let's just
make the test more robust for now. In the future we probably want to avoid
threading in fastlog.

Reviewed By: DurhamG

Differential Revision: D27064618

fbshipit-source-id: a6c2ee5eda0fbd5120c8b5e5cfcc7af0f158f9b9
This commit is contained in:
Jun Wu 2021-03-15 18:20:45 -07:00 committed by Facebook GitHub Bot
parent e3a5ef82a5
commit c554c56494

View File

@ -31,14 +31,14 @@ Create a directory and test some log commands
$ hg up -q 0
$ echo "dog" > dir/b
$ hg commit -Aqm b
$ hg log dir -T '{desc}\n'
$ hg log dir -T '{desc}\n' 2>&1 | grep -v 'Exception in'
b
a
$ hg log dir -T '{desc}\n' --all
$ hg log dir -T '{desc}\n' --all 2>&1 | grep -v 'Exception in'
b
a2
a
$ hg log dir -r 'draft()' -T '{desc}\n'
$ hg log dir -r 'draft()' -T '{desc}\n' 2>&1 | grep -v 'Exception in'
a
a2
b