Skip to content
Snippets Groups Projects
  • Iustin Pop's avatar
    Fix asyncnotifier unit tests · 0f85ebd9
    Iustin Pop authored
    
    On my workstation, if I run the following two tests in this exact
    order:
    
    - TestSingleFileEventHandler.testError
    - TestSingleFileEventHandler.testReplace
    
    the second test will fail, because there is no "unregister" of
    previous tests (and the poll() done by asyncore will fire on the
    previous files which are now removed, etc. etc.).
    
    While investigating this, I realised that we don't do any cleanup of
    the various handlers/notifiers we setup for this test, so if we simply
    add a proper cleanup, the tests will work nicely (in any order :).
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
    0f85ebd9