You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/11/27 21:10:42 UTC

[3/3] qpid-proton git commit: NO-JIRA: [go] Fix race condition in authentication test

NO-JIRA: [go] Fix race condition in authentication test

TestBadPass was failing sporadically due to racy checks on asynchronous errors.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/45307744
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/45307744
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/45307744

Branch: refs/heads/master
Commit: 45307744b9729a5a1b29949fb5e4f8dc34c9d486
Parents: 55afeab
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Nov 27 10:29:46 2017 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Nov 27 16:09:47 2017 -0500

----------------------------------------------------------------------
 .../go/src/qpid.apache.org/electron/electron_test.go         | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/45307744/proton-c/bindings/go/src/qpid.apache.org/electron/electron_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/electron_test.go b/proton-c/bindings/go/src/qpid.apache.org/electron/electron_test.go
index 4cd8453..d8862b9 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/electron_test.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/electron_test.go
@@ -76,10 +76,10 @@ func newServer(t *testing.T, cont Container, opts ...ConnectionOption) (net.Addr
 func newClient(t *testing.T, cont Container, addr net.Addr, opts ...ConnectionOption) Session {
 	conn, err := net.Dial(addr.Network(), addr.String())
 	fatalIf(t, err)
-	c, err := cont.Connection(conn, opts...)
-	fatalIf(t, err)
-	sn, err := c.Session()
-	fatalIf(t, err)
+	// Don't  bother checking error here, it's an async error so it's racy to do so anyway.
+	// Let caller use Sync() or catch it on first use.
+	c, _ := cont.Connection(conn, opts...)
+	sn, _ := c.Session()
 	return sn
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org