• Yves Arrouye's avatar
    Do not allow simultaneous computations and uploads of the EID · 5115783a
    Yves Arrouye authored
    In some situations, Start() would be called from both the constructor
    and the observer notification method quickly, yielding to multiple
    concurrent flows. Prevent those.
    
    In addition, redo the tests so that they test both work from the
    observer notification method and from an existing policy. Also add
    a test that triggers the concurrency situation and verifies that
    there is only one flow running in that situation.
    
    BUG=chromium:887683
    TEST=unit_tests --gtest_filter=*EnrollmentPolicyObserverTest*
    CQ-DEPEND=CL:1234373
    
    Change-Id: Ice6b46e19bf77a837b4c4908f332e9af6c5189f5
    Reviewed-on: https://chromium-review.googlesource.com/1237242
    Commit-Queue: Yves Arrouye <drcrash@chromium.org>
    Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#594751}
    5115783a
enrollment_policy_observer.cc 6.6 KB