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

Further mockbrocker improvements #492

Merged
merged 2 commits into from
Aug 6, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default: fmt vet errcheck test

test:
go test -v -timeout 60s -race ./...
go test -v -timeout 2m -race ./...
Copy link
Contributor

Choose a reason for hiding this comment

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

why does the test suddenly need so much more time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The consumer tests are rather fast, it is that other tests that use the older mock broker logic (the Returns() plus the default handler to be more specific) sometimes take longer to complete. The thing is that in the original mock broker implementation it would delay a response to a request indefinitely until a reply is provided via Returns() method. Now if a mock broker happens to get a request before Returns() is called it waits for expectationTimeout for Returns() to be called and then ignores the request making it IO timeout on the consumer side. Consumer retries eventually but that adds up to the execution time.

I will try to increase the expectationTimeout and bring the overall test suite timeout to the original value.


vet:
go vet ./...
Expand Down
Loading