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

xds: enable race detector and some small cleanup #9461

Merged
merged 4 commits into from
Jan 7, 2021
Merged

Commits on Jan 7, 2021

  1. xds: Pass in logger

    small cleanup in tests
    dnephin committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    375aed5 View commit details
    Browse the repository at this point in the history
  2. xds: Fix data race

    TestEnvoy.Close used e.stream.recvCh == nil to indicate the channel had already
    been closed, so that TestEnvoy.Close can be called multiple times. The recvCh
    was not protected by a lock, so setting it to nil caused a data race with any
    goroutine trying to read from the channel.
    
    Instead set the stream to nil. The stream is guarded by a lock, so it does not race.
    
    This change allows us to test the agent/xds package using -race.
    dnephin committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    2e2ee41 View commit details
    Browse the repository at this point in the history
  3. xds: remove Server.Initialize

    Requiring a call to initialize to set a single field is not really substantially different
    from having to set that field to a value.
    dnephin committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    4b8b2a4 View commit details
    Browse the repository at this point in the history
  4. Remove an unnecessary else

    dnephin committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    a04cefa View commit details
    Browse the repository at this point in the history