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

clientv3/integration: Reduce flakines of TestGetTokenWithoutAuth #12200

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

ptabor
Copy link
Contributor

@ptabor ptabor commented Aug 4, 2020

The test is vary flaky on Travis.

Seems that since (#7724) the
client is expected to simply ignore whether server is in AuthDisabled
mode even if the user supplies credentials.

The tests used to:

  • use very large cluster (10 nodes)
  • set very low timeout (1 sec)

Such setup led to frequent deadlineExceed errors or following failures:

=== RUN   TestGetTokenWithoutAuth
{"level":"warn","ts":"2020-08-04T16:50:48.686+0200","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-35573307-1ee5-441b-acc7-d073f0bd7de5/localhost:69820396562031027440","attempt":0,"error":"rpc error: code = Unavailable desc = etcdserver: leader changed"}
    user_test.go:151: other errors:etcdserver: leader changed
--- FAIL: TestGetTokenWithoutAuth (10.91s)

The flakiness is hard to spot when executing isolated:

GOARCH=amd64 CPU=1 PASSES='integration' ./test -v --run TestGetTokenWithoutAuth -count=10

But is visible when all tests are executed:
GOARCH=amd64 CPU=1 PASSES='integration' ./test --count=3

I believe its due to slowness coming from CPU utilization when multiple tests are executed.

@ptabor ptabor force-pushed the 20200804-TestGetTokenWithoutAuth branch from fb9124a to a03f57f Compare August 4, 2020 16:44
The test is vary flaky on Travis.

Seems that since (etcd-io#7724) the
client is expected to simply ignore whether server is in AuthDisabled
mode even if the user supplies credentials.

The tests used to:
  * use very large cluster (10 nodes)
  * set very low timeout (1 sec)

Such setup led to frequent deadlineExceed errors or following failures:

    === RUN   TestGetTokenWithoutAuth
    {"level":"warn","ts":"2020-08-04T16:50:48.686+0200","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-35573307-1ee5-441b-acc7-d073f0bd7de5/localhost:69820396562031027440","attempt":0,"error":"rpc error: code = Unavailable desc = etcdserver: leader changed"}
        user_test.go:151: other errors:etcdserver: leader changed
    --- FAIL: TestGetTokenWithoutAuth (10.91s)
@ptabor ptabor force-pushed the 20200804-TestGetTokenWithoutAuth branch from a03f57f to dcce80f Compare August 4, 2020 18:27
@ptabor
Copy link
Contributor Author

ptabor commented Aug 4, 2020

\cc @jingyih - could you, pls, review / merge

Copy link
Contributor

@cfc4n cfc4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xiang90 xiang90 merged commit 9d182c2 into etcd-io:master Aug 7, 2020
lavacat pushed a commit to lavacat/etcd that referenced this pull request Jun 18, 2022
lavacat pushed a commit to lavacat/etcd that referenced this pull request Jun 27, 2022
…ithoutAuth

backport from branch-3.5:
etcd-io#12200

Signed-off-by: Bogdan Kanivets <[email protected]>
tjungblu pushed a commit to tjungblu/etcd that referenced this pull request Sep 8, 2022
…ithoutAuth

backport from branch-3.5:
etcd-io#12200

Signed-off-by: Bogdan Kanivets <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants