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

go.etcd.io/etcd/client test fails with upstream golang #10539

Closed
sudeeshjohn opened this issue Mar 13, 2019 · 3 comments · Fixed by #10666
Closed

go.etcd.io/etcd/client test fails with upstream golang #10539

sudeeshjohn opened this issue Mar 13, 2019 · 3 comments · Fixed by #10666

Comments

@sudeeshjohn
Copy link
Contributor

Please read https://github.com/etcd-io/etcd/blob/master/Documentation/reporting_bugs.md.

Step 23/25 : RUN cd /go/src/go.etcd.io/etcd && TEST_OPTS="PASSES='unit'" make test
 ---> Running in 1a3c2a44d409
TEST_OPTS: PASSES='unit'
log-file: test-MTU1MjQ5MDIyOQo.log
PASSES='unit' ./test 2>&1 | tee test-MTU1MjQ5MDIyOQo.log
Running with TEST_CPUS: 1,2,4
Starting 'unit' pass at Wed Mar 13 15:17:15 UTC 2019
Running unit tests...
ok  	go.etcd.io/etcd	1.438s	coverage: 0.0% of statements
ok  	go.etcd.io/etcd/auth	40.405s	coverage: 76.5% of statements
--- FAIL: TestHTTPClusterClientDo (0.00s)
    client_test.go:426: #6: got err=client: etcd member  returns server error [Bad Gateway], want=client: etcd member  returns server error [Bad Gateway]
--- FAIL: TestRedirectFollowingHTTPClient (0.00s)
    client_test.go:730: #0: got err=fail!, want=fail!
    client_test.go:730: #5: got err=Location header not set, want=Location header not set
    client_test.go:730: #6: got err=Location header not valid URL: :, want=Location header not valid URL: :
--- FAIL: TestHTTPKeysAPIWatcherAction (0.02s)
    keys_test.go:1008: #0: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6780), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e66c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #1: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e69c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6900), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #2: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6c00), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6b40), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}}
    keys_test.go:1008: #3: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6e40), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6d80), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}}
--- FAIL: TestHTTPClusterClientDo (0.00s)
    client_test.go:426: #6: got err=client: etcd member  returns server error [Bad Gateway], want=client: etcd member  returns server error [Bad Gateway]
--- FAIL: TestRedirectFollowingHTTPClient (0.00s)
    client_test.go:730: #0: got err=fail!, want=fail!
    client_test.go:730: #5: got err=Location header not set, want=Location header not set
    client_test.go:730: #6: got err=Location header not valid URL: :, want=Location header not valid URL: :
--- FAIL: TestHTTPKeysAPIWatcherAction (0.00s)
    keys_test.go:1008: #0: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca540), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca480), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #1: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca6c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca600), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #2: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca900), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca840), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}}
    keys_test.go:1008: #3: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003cab40), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003caa80), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}}
--- FAIL: TestHTTPClusterClientDo (0.00s)
    client_test.go:426: #6: got err=client: etcd member  returns server error [Bad Gateway], want=client: etcd member  returns server error [Bad Gateway]
--- FAIL: TestRedirectFollowingHTTPClient (0.00s)
    client_test.go:730: #0: got err=fail!, want=fail!
    client_test.go:730: #5: got err=Location header not set, want=Location header not set
    client_test.go:730: #6: got err=Location header not valid URL: :, want=Location header not valid URL: :
--- FAIL: TestHTTPKeysAPIWatcherAction (0.00s)
    keys_test.go:1008: #0: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e83c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8300), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #1: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8540), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8480), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #2: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8780), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e86c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}}
    keys_test.go:1008: #3: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e89c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8900), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}}
FAIL
coverage: 16.4% of statements
FAIL	go.etcd.io/etcd/client	2.451s
ok  	go.etcd.io/etcd/clientv3	10.783s	coverage: 21.1% of statements
ok  	go.etcd.io/etcd/clientv3/balancer	7.758s	coverage: 68.8% of statements
ok  	go.etcd.io/etcd/clientv3/clientv3util	1.156s	coverage: 0.0% of statements [no tests to run]
ok  	go.etcd.io/etcd/clientv3/concurrency	2.110s	coverage: 25.0% of statements
ok  	go.etcd.io/etcd/clientv3/namespace	1.078s	coverage: 11.3% of statements
ok  	go.etcd.io/etcd/clientv3/naming	3.782s	coverage: 78.3% of statements
ok  	go.etcd.io/etcd/clientv3/ordering	122.581s	coverage: 89.4% of statements
ok  	go.etcd.io/etcd/clientv3/snapshot	70.249s	coverage: 68.7% of statements
ok  	go.etcd.io/etcd/clientv3/yaml	1.283s	coverage: 91.3% of statements
ok  	go.etcd.io/etcd/embed	1.827s	coverage: 33.5% of statements
ok  	go.etcd.io/etcd/etcdctl	1.674s	coverage: 0.0% of statements
ok  	go.etcd.io/etcd/etcdctl/ctlv2/command	1.098s	coverage: 0.7% of statements
ok  	go.etcd.io/etcd/etcdctl/ctlv3/command	1.177s	coverage: 3.8% of statements
ok  	go.etcd.io/etcd/etcdmain	1.818s	coverage: 24.4% of statements
ok  	go.etcd.io/etcd/etcdserver	19.507s	coverage: 26.5% of statements
ok  	go.etcd.io/etcd/etcdserver/api/etcdhttp	1.327s	coverage: 26.2% of statements
ok  	go.etcd.io/etcd/etcdserver/api/membership	1.135s	coverage: 55.2% of statements
ok  	go.etcd.io/etcd/etcdserver/api/rafthttp	3.895s	coverage: 72.2% of statements
ok  	go.etcd.io/etcd/etcdserver/api/snap	1.564s	coverage: 49.0% of statements
ok  	go.etcd.io/etcd/etcdserver/api/v2auth	17.833s	coverage: 70.9% of statements
ok  	go.etcd.io/etcd/etcdserver/api/v2discovery	2.485s	coverage: 61.1% of statements
ok  	go.etcd.io/etcd/etcdserver/api/v2error	1.061s	coverage: 85.7% of statements
ok  	go.etcd.io/etcd/etcdserver/api/v2http	2.201s	coverage: 73.8% of statements
ok  	go.etcd.io/etcd/etcdserver/api/v2http/httptypes	1.102s	coverage: 76.2% of statements
ok  	go.etcd.io/etcd/etcdserver/api/v2store	3.477s	coverage: 91.1% of statements
ok  	go.etcd.io/etcd/etcdserver/api/v3compactor	66.335s	coverage: 80.0% of statements
ok  	go.etcd.io/etcd/etcdserver/api/v3rpc	1.145s	coverage: 3.7% of statements
ok  	go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes	1.050s	coverage: 75.0% of statements
ok  	go.etcd.io/etcd/lease	15.291s	coverage: 85.1% of statements
ok  	go.etcd.io/etcd/lease/leasehttp	8.035s	coverage: 66.7% of statements
ok  	go.etcd.io/etcd/mvcc	57.103s	coverage: 81.8% of statements
ok  	go.etcd.io/etcd/mvcc/backend	10.485s	coverage: 78.2% of statements
ok  	go.etcd.io/etcd/pkg/adt	4.934s	coverage: 85.3% of statements
ok  	go.etcd.io/etcd/pkg/crc	1.036s	coverage: 100.0% of statements
ok  	go.etcd.io/etcd/pkg/expect	1.064s	coverage: 93.9% of statements
ok  	go.etcd.io/etcd/pkg/fileutil	1.842s	coverage: 76.5% of statements
ok  	go.etcd.io/etcd/pkg/flags	1.052s	coverage: 66.9% of statements
ok  	go.etcd.io/etcd/pkg/httputil	1.032s	coverage: 62.5% of statements
ok  	go.etcd.io/etcd/pkg/idutil	1.021s	coverage: 100.0% of statements
ok  	go.etcd.io/etcd/pkg/ioutil	1.122s	coverage: 74.6% of statements
ok  	go.etcd.io/etcd/pkg/logutil	7.275s	coverage: 29.8% of statements
ok  	go.etcd.io/etcd/pkg/netutil	4.041s	coverage: 58.5% of statements
ok  	go.etcd.io/etcd/pkg/osutil	1.022s	coverage: 78.4% of statements
ok  	go.etcd.io/etcd/pkg/pathutil	1.014s	coverage: 100.0% of statements
ok  	go.etcd.io/etcd/pkg/pbutil	1.019s	coverage: 76.9% of statements
ok  	go.etcd.io/etcd/pkg/proxy	14.524s	coverage: 66.0% of statements
ok  	go.etcd.io/etcd/pkg/report	1.045s	coverage: 89.0% of statements
ok  	go.etcd.io/etcd/pkg/schedule	1.016s	coverage: 85.5% of statements
ok  	go.etcd.io/etcd/pkg/srv	1.141s	coverage: 88.5% of statements
ok  	go.etcd.io/etcd/pkg/stringutil	1.027s	coverage: 76.5% of statements
ok  	go.etcd.io/etcd/pkg/testutil	1.279s	coverage: 17.1% of statements
ok  	go.etcd.io/etcd/pkg/tlsutil	58.186s	coverage: 6.9% of statements
ok  	go.etcd.io/etcd/pkg/transport	19.917s	coverage: 54.2% of statements
ok  	go.etcd.io/etcd/pkg/types	1.159s	coverage: 90.8% of statements
ok  	go.etcd.io/etcd/pkg/wait	1.956s	coverage: 92.9% of statements
ok  	go.etcd.io/etcd/proxy/grpcproxy	8.866s	coverage: 11.9% of statements
ok  	go.etcd.io/etcd/proxy/httpproxy	1.156s	coverage: 76.1% of statements
ok  	go.etcd.io/etcd/proxy/tcpproxy	1.118s	coverage: 58.5% of statements
ok  	go.etcd.io/etcd/raft	17.177s	coverage: 87.0% of statements
ok  	go.etcd.io/etcd/tools/etcd-dump-logs	1.140s	coverage: 0.0% of statements
ok  	go.etcd.io/etcd/wal	22.720s	coverage: 75.6% of statements
! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test-MTU1MjQ5MDIyOQo.log
Running with TEST_CPUS: 1,2,4
Starting 'unit' pass at Wed Mar 13 15:17:15 UTC 2019
Running unit tests...
ok  	go.etcd.io/etcd	1.438s	coverage: 0.0% of statements
ok  	go.etcd.io/etcd/auth	40.405s	coverage: 76.5% of statements
--- FAIL: TestHTTPClusterClientDo (0.00s)
    client_test.go:426: #6: got err=client: etcd member  returns server error [Bad Gateway], want=client: etcd member  returns server error [Bad Gateway]
--- FAIL: TestRedirectFollowingHTTPClient (0.00s)
    client_test.go:730: #0: got err=fail!, want=fail!
    client_test.go:730: #5: got err=Location header not set, want=Location header not set
    client_test.go:730: #6: got err=Location header not valid URL: :, want=Location header not valid URL: :
--- FAIL: TestHTTPKeysAPIWatcherAction (0.02s)
    keys_test.go:1008: #0: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6780), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e66c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #1: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e69c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6900), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #2: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6c00), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6b40), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}}
    keys_test.go:1008: #3: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6e40), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e6d80), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}}
--- FAIL: TestHTTPClusterClientDo (0.00s)
    client_test.go:426: #6: got err=client: etcd member  returns server error [Bad Gateway], want=client: etcd member  returns server error [Bad Gateway]
--- FAIL: TestRedirectFollowingHTTPClient (0.00s)
    client_test.go:730: #0: got err=fail!, want=fail!
    client_test.go:730: #5: got err=Location header not set, want=Location header not set
    client_test.go:730: #6: got err=Location header not valid URL: :, want=Location header not valid URL: :
--- FAIL: TestHTTPKeysAPIWatcherAction (0.00s)
    keys_test.go:1008: #0: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca540), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca480), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #1: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca6c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca600), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #2: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca900), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003ca840), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}}
    keys_test.go:1008: #3: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003cab40), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003caa80), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}}
--- FAIL: TestHTTPClusterClientDo (0.00s)
    client_test.go:426: #6: got err=client: etcd member  returns server error [Bad Gateway], want=client: etcd member  returns server error [Bad Gateway]
--- FAIL: TestRedirectFollowingHTTPClient (0.00s)
    client_test.go:730: #0: got err=fail!, want=fail!
    client_test.go:730: #5: got err=Location header not set, want=Location header not set
    client_test.go:730: #6: got err=Location header not valid URL: :, want=Location header not valid URL: :
--- FAIL: TestHTTPKeysAPIWatcherAction (0.00s)
    keys_test.go:1008: #0: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e83c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8300), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #1: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8540), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8480), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:false}}
    keys_test.go:1008: #2: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8780), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e86c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x0, Recursive:true}}
    keys_test.go:1008: #3: incorrect watcher: want=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e89c0), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}} got=&client.httpWatcher{client:(*client.staticHTTPClient)(0xc0003e8900), nextWait:client.waitAction{Prefix:"", Key:"/foo", WaitIndex:0x14, Recursive:false}}
FAIL
coverage: 16.4% of statements
FAIL	go.etcd.io/etcd/client	2.451s
ok  	go.etcd.io/etcd/clientv3	10.783s	coverage: 21.1% of statements
ok  	go.etcd.io/etcd/clientv3/balancer	7.758s	coverage: 68.8% of statements
ok  	go.etcd.io/etcd/clientv3/clientv3util	1.156s	coverage: 0.0% of statements [no tests to run]
Makefile:146: recipe for target 'test' failed
make: *** [test] Error 1
The command '/bin/sh -c cd /go/src/go.etcd.io/etcd && TEST_OPTS="PASSES='unit'" make test' returned a non-zero code: 2

golang version:

go version devel +82af9e6 Wed Mar 13 14:40:36 2019 +0000 linux/amd64

etcd version:

etcd Version: 3.3.0+git
Git SHA: e1ca3b4
Go Version: devel +82af9e6 Wed Mar 13 14:40:36 2019 +0000
Go OS/Arch: linux/amd64
@sudeeshjohn
Copy link
Contributor Author

/cc @gyuho

@hexfusion
Copy link
Contributor

hexfusion commented Mar 22, 2019

Go Version: devel +82af9e6 Wed Mar 13 14:40:36 2019 +0000

$ git describe --all --abbrev=4 82af9e6
tags/go1.12beta2-517-g82af9

Master does not yet support go 1.12.x, we could use some help with this @sudeeshjohn if you have time.

ref: #10528

@mkumatag
Copy link
Contributor

New changes went into Errorf function to include the frame which will not match the new error created in the different location in the code, hence the test code needs to be modified just to check the errorstring instead of deepequal check which is failing.

Reference: https://go-review.googlesource.com/c/go/+/163559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants