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

removed dependency on go-nats/test #151

Merged
merged 2 commits into from
Aug 18, 2017
Merged

Conversation

petemiron
Copy link
Contributor

Removed dependency of go-nats/test before we switch test to be unexported.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 94.539% when pulling 7dae3d9 on remove-go-nats-test-dependency into d99acc1 on master.

nc, err = opts.Connect()
if err != nil {
t.Fatalf("Expected to connect correctly, got err %v", err)
}
Copy link
Member

Choose a reason for hiding this comment

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

It is custom to do a defer nc.Close() after you have checked for error.

stan_test.go Outdated
@@ -1468,6 +1471,7 @@ func TestNatsConn(t *testing.T) {
if sc.NatsConn() != nc {
t.Fatal("Unexpected wrapped conn")
}
nc.Close()
Copy link
Member

Choose a reason for hiding this comment

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

favor defer after connection is created ok instead, in case test fails or you one day have a return before end of function.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 94.539% when pulling b194913 on remove-go-nats-test-dependency into d99acc1 on master.

@petemiron petemiron merged commit 1b74f22 into master Aug 18, 2017
@petemiron petemiron deleted the remove-go-nats-test-dependency branch August 18, 2017 18:09
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 this pull request may close these issues.

None yet

3 participants