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

[BUG] Some tests fail intermittently #48

Open
imyousuf opened this issue Jan 4, 2021 · 0 comments
Open

[BUG] Some tests fail intermittently #48

imyousuf opened this issue Jan 4, 2021 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@imyousuf
Copy link
Collaborator

imyousuf commented Jan 4, 2021

Describe the bug
Some tests seemingly fail intermittently. For example -

--- FAIL: TestBroadcastControllerPost (0.00s)
    --- FAIL: TestBroadcastControllerPost/Success:202-Accepted (0.00s)
        broadcast_test.go:231: 
            	Error Trace:	broadcast_test.go:231
            	Error:      	"{\"level\":\"error\",\"requestId\":\"bvpkvtn0s6kqnb8sft50\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"channel token did not match: sometokenforget vs no-such-token-for-broadcast\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft50\",\"method\":\"POST\",\"url\":\"/channel/consumer-channel-some-id/broadcast\",\"status\":403,\"size\":28,\"duration\":0.28833,\"time\":\"2021-01-04T12:27:18-05:00\"}
                {\"level\":\"error\",\"requestId\":\"bvpkvtn0s6kqnb8sft2g\",\"error\":\"sql: no rows in result set\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"error creating message\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft2g\",\"method\":\"POST\",\"url\":\"/channel/consumer-channel-some-id/broadcast\",\"status\":500,\"size\":26,\"duration\":0.560721,\"time\":\"2021-01-04T12:27:18-05:00\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft20\",\"messageId\":\"bvpkvtn0s6kqnb8sft6g\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"Message accepted for broadcast\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft20\",\"method\":\"POST\",\"url\":\"/channel/consumer-channel-some-id/broadcast\",\"status\":202,\"size\":0,\"duration\":3.0318,\"time\":\"2021-01-04T12:27:18-05:00\"}
                {\"level\":\"error\",\"requestId\":\"bvpkvtn0s6kqnb8sft30\",\"error\":\"sql: no rows in result set\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"no producer found: \"}
                {\"level\":\"error\",\"requestId\":\"bvpkvtn0s6kqnb8sft00\",\"error\":\"sql: no rows in result set\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"no producer found: no-such-producer-id-for-broadcast\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft00\",\"method\":\"POST\",\"url\":\"/channel/consumer-channel-some-id/broadcast\",\"status\":401,\"size\":27,\"duration\":3.281869,\"time\":\"2021-01-04T12:27:18-05:00\"}
                {\"level\":\"error\",\"requestId\":\"bvpkvtn0s6kqnb8sft5g\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"producer token did not match: sometokenforget - 0 vs  - \"}
                {\"level\":\"error\",\"requestId\":\"bvpkvtn0s6kqnb8sft60\",\"error\":\"sql: no rows in result set\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"error reading body\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft5g\",\"method\":\"POST\",\"url\":\"/channel/consumer-channel-some-id/broadcast\",\"status\":403,\"size\":29,\"duration\":3.075281,\"time\":\"2021-01-04T12:27:18-05:00\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft60\",\"method\":\"POST\",\"url\":\"/channel/consumer-channel-some-id/broadcast\",\"status\":500,\"size\":22,\"duration\":3.001693,\"time\":\"2021-01-04T12:27:18-05:00\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft10\",\"messageId\":\"bvpkvtn0s6kqnb8sft7g\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"Message accepted for broadcast\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft10\",\"method\":\"POST\",\"url\":\"/channel/consumer-channel-some-id/broadcast\",\"status\":202,\"size\":0,\"duration\":3.523941,\"time\":\"2021-01-04T12:27:18-05:00\"}
                {\"level\":\"error\",\"requestId\":\"bvpkvtn0s6kqnb8sft1g\",\"error\":\"duplicate message id for channel\",\"messageId\":\"bvpkvtn0s6kqnb8sft9g\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"message rejected because its duplicate id in channel\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft1g\",\"method\":\"POST\",\"url\":\"/channel/consumer-channel-some-id/broadcast\",\"status\":409,\"size\":32,\"duration\":3.652643,\"time\":\"2021-01-04T12:27:18-05:00\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft3g\",\"messageId\":\"bvpkvtn0s6kqnb8sftag\",\"time\":\"2021-01-04T12:27:18-05:00\",\"message\":\"Message accepted for broadcast\"}
                {\"level\":\"info\",\"requestId\":\"bvpkvtn0s6kqnb8sft3g\",\"method\":\"POST\",\"url\":\"/channel/consumer-channel-some-id/broadcast\",\"status\":202,\"size\":0,\"duration\":3.461775,\"time\":\"2021-01-04T12:27:18-05:00\"}" does not contain "bvpkvtn0s6kqnb8sft0g"
            	Test:       	TestBroadcastControllerPost/Success:202-Accepted

It is difficult to reproduce the cause of the test failure.

To Reproduce
Steps to reproduce the behavior:
Keep running the test until it fails.

Expected behavior
Test passes 100% of times.

@imyousuf imyousuf added bug Something isn't working good first issue Good for newcomers labels Jan 4, 2021
@imyousuf imyousuf added the help wanted Extra attention is needed label Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant