Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Some test failed #40

Open
enzo-yang opened this issue Mar 21, 2018 · 2 comments
Open

Some test failed #40

enzo-yang opened this issue Mar 21, 2018 · 2 comments

Comments

@enzo-yang
Copy link

go test shows errors sometimes, It's not always happen

there maybe errors like bellow

➜  go-grpc-prometheus git:(master) go test
--- FAIL: TestStreamingIncrementsHandled (0.00s)
        Error Trace:    server_test.go:218
        Error:          Not equal:
                        expected: 1
                        received: 0
        Messages:       grpc_server_handled_total should be incremented for PingList FailedPrecondition

--- FAIL: TestStreamingIncrementsStarted (0.00s)
        Error Trace:    server_test.go:168
        Error:          Not equal:
                        expected: 6
                        received: 5
        Messages:       grpc_server_started_total should be incremented for PingList

--- FAIL: TestServerInterceptorSuite (0.05s)
        server_test.go:86: stopped grpc.Server at: 127.0.0.1:51448
FAIL
exit status 1
@bwplotka
Copy link
Collaborator

Yup - it seems flaky. I think because all these tests are based on time (e.g that test case have 1 minute to complete), and Travis being super slow at certain moments.

Any PR fixing that are welcome (:

@knweiss
Copy link
Contributor

knweiss commented Apr 17, 2018

FWIW: I'm working on some other fixes and also just noticed occasional test failures in TestServerInterceptorSuite on my local system (8-core, otherwise idle):

$ go test -run=TestServerInterceptorSuite
--- FAIL: TestServerInterceptorSuite (0.11s)
    --- FAIL: TestServerInterceptorSuite/TestStreamingIncrementsHandled (0.01s)
    	server_test.go:218: 
    			Error Trace:	server_test.go:218
    			Error:      	Not equal: 
    			            	expected: 1
    			            	actual  : 0
    			Test:       	TestServerInterceptorSuite/TestStreamingIncrementsHandled
    			Messages:   	grpc_server_handled_total should be incremented for PingList FailedPrecondition
    --- FAIL: TestServerInterceptorSuite/TestStreamingIncrementsStarted (0.00s)
    	server_test.go:168: 
    			Error Trace:	server_test.go:168
    			Error:      	Not equal: 
    			            	expected: 6
    			            	actual  : 5
    			Test:       	TestServerInterceptorSuite/TestStreamingIncrementsStarted
    			Messages:   	grpc_server_started_total should be incremented for PingList
	server_test.go:86: stopped grpc.Server at: 127.0.0.1:50543
FAIL
exit status 1
FAIL	github.com/grpc-ecosystem/go-grpc-prometheus	0.131s

$ go test -run=TestServerInterceptorSuite
--- FAIL: TestServerInterceptorSuite (0.11s)
    --- FAIL: TestServerInterceptorSuite/TestStreamingIncrementsHistograms (0.01s)
    	server_test.go:193: 
    			Error Trace:	server_test.go:193
    			Error:      	Not equal: 
    			            	expected: 4
    			            	actual  : 3
    			Test:       	TestServerInterceptorSuite/TestStreamingIncrementsHistograms
    			Messages:   	grpc_server_handling_seconds_count should be incremented for PingList FailedPrecondition
	server_test.go:86: stopped grpc.Server at: 127.0.0.1:50527
FAIL
exit status 1
FAIL	github.com/grpc-ecosystem/go-grpc-prometheus	0.132s

$ go version
go version go1.10.1 darwin/amd64
$ git describe --tag
v1.1-39-g67e2f48

This was referenced Apr 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants