Skip to content

Commit 6454487

Browse files
committed
fix: mute until success
1 parent 2a5cfa7 commit 6454487

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

integration_test.go

+8-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ func waitForHealthyAmqp(t *testing.T, connStr string) *Conn {
4040
defer cancel()
4141
tkr := time.NewTicker(time.Second)
4242

43-
// only log connection-level logs when verbose is enabled
44-
connLogger := simpleLogF(func(s string, i ...interface{}) {})
45-
if testing.Verbose() {
46-
connLogger = simpleLogF(t.Logf)
47-
}
43+
// only log connection-level logs when connection has succeeded
44+
muted := true
45+
connLogger := simpleLogF(func(s string, i ...interface{}) {
46+
if !muted {
47+
t.Logf(s, i...)
48+
}
49+
})
4850

4951
var lastErr error
5052
for {
@@ -71,6 +73,7 @@ func waitForHealthyAmqp(t *testing.T, connStr string) *Conn {
7173
t.Log("publish ping failed", err.Error())
7274
} else {
7375
t.Log("ping successful")
76+
muted = true
7477
return conn
7578
}
7679
}

0 commit comments

Comments
 (0)