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

Add a test for the initial channel state while waiting for the first name resolver update #7686

Open
dfawley opened this issue Sep 30, 2024 · 1 comment
Assignees
Labels
Area: Testing Includes tests and testing utilities that we have for unit and e2e tests within our repo. P2 Status: Help Wanted Type: Testing

Comments

@dfawley
Copy link
Member

dfawley commented Sep 30, 2024

I don't think this is currently tested, and I'm not clear whether we have a bug. We should have a test that does the following:

  1. Create a channel with a manual name resolver set to not produce any updates when constructed.
  2. Confirm the channel's State() == Idle.
  3. Two forks for this test:
    1. Call ClientConn.Connect() and confirm the channel's State() == Connecting immediately upon returning. (It's possible this is racy but it should not be.)
    2. Perform an RPC, which will block since the name resolver never produced anything. In a separate goroutine, confirm the state eventually changes to Connecting using testutils.AwaitState.
  4. Call internal.EnterIdleModeForTesting and then perform (2) and (3) above.
@dfawley dfawley added Status: Help Wanted Type: Testing Area: Testing Includes tests and testing utilities that we have for unit and e2e tests within our repo. labels Sep 30, 2024
@janardhanvissa
Copy link
Contributor

@arjan-bal Please assign me this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Testing Includes tests and testing utilities that we have for unit and e2e tests within our repo. P2 Status: Help Wanted Type: Testing
Projects
None yet
Development

No branches or pull requests

3 participants