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

TestRequestMessageFromMailboxAsync from mailbox suite is flaky #567

Closed
dshulyak opened this issue Jan 23, 2018 · 3 comments · Fixed by #610
Closed

TestRequestMessageFromMailboxAsync from mailbox suite is flaky #567

dshulyak opened this issue Jan 23, 2018 · 3 comments · Fixed by #610

Comments

@dshulyak
Copy link
Contributor

dshulyak commented Jan 23, 2018

Problem

Mentioned test randomly fails on CI.

--- FAIL: TestRequestMessageFromMailboxAsync (2.34s)
        Error Trace:    whisper_mailbox_test.go:92
	Error:      	Not equal: 
	            	expected: 0
	            	received: 1
--- FAIL: TestWhisperMailboxTestSuite (2.34s)
FAIL
FAIL	command-line-arguments	2.433s

Actually I can make it fail consistently with a following change:

diff --git a/e2e/whisper/whisper_mailbox_test.go b/e2e/whisper/whisper_mailbox_test.go
index 5865f1e..6e04e67 100644
--- a/e2e/whisper/whisper_mailbox_test.go
+++ b/e2e/whisper/whisper_mailbox_test.go
@@ -87,6 +87,7 @@ func (s *WhisperMailboxSuite) TestRequestMessageFromMailboxAsync() {
        s.postMessageToPrivate(rpcClient, pubkey.String(), topic.String(), hexutil.Encode([]byte("Hello world!")))
 
        //There are no messages, because it's a sender filter
+       time.Sleep(1 * time.Second)
        messages = s.getMessagesByMessageFilterId(rpcClient, messageFilterID)
        s.Require().Equal(0, len(messages))
 

Acceptance Criteria

Test passes consistently

@dshulyak
Copy link
Contributor Author

dshulyak commented Jan 23, 2018

@b00ris please take a look, as you are the author of this test

You can reproduce the error by applying diff from the PR description and then run:

go test ./e2e/whisper/whisper_mailbox_test.go -testify.m=TestRequestMessageFromMailboxAsync -network=

If you don't have time right now, please let me know and I will try to debug it myself

@dshulyak
Copy link
Contributor Author

@b00ris
Copy link
Contributor

b00ris commented Jan 23, 2018

@dshulyak Ok. I'll check it today.

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

Successfully merging a pull request may close this issue.

4 participants