Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix races in test-performance-eventlooputil #36028

Closed
wants to merge 1 commit into from

Commits on Nov 8, 2020

  1. test: fix races in test-performance-eventlooputil

    Fix two races in test-performance-eventlooputil resulting in a flaky
    test.
    
    elu1 was capture after start time t from spin look. If OS descides to
    reschedule the process after capturing t but before getting elu for
    >=50ms the spin loop is actually a nop. elu1 doesn't show this and as
    a result elut3 = eventLoopUtilization(elu1) results in
    elu3.active === 0.
    Moving capturing of t after capturing t, just before the spin look
    avoids this.
    
    Similar if OS decides to shedule a different process between getting
    the total elu from start and the diff elu showing the spin loop the
    check to verify that total active time is long then the spin loop
    fails.
    Exchanging these statements avoids this race.
    Flarna committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    b7800f1 View commit details
    Browse the repository at this point in the history