diff --git a/amqpiface/interfaces.go b/amqpiface/interfaces.go index e23f72e0..0b863837 100644 --- a/amqpiface/interfaces.go +++ b/amqpiface/interfaces.go @@ -1,3 +1,8 @@ +// Copyright (c) 2012, Sean Treadway, SoundCloud Ltd. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// Source code and contact info at http://github.com/streadway/amqp + package amqpiface import ( diff --git a/integration_test.go b/integration_test.go index 6fedb12d..b4a2958c 100644 --- a/integration_test.go +++ b/integration_test.go @@ -450,7 +450,7 @@ func TestIntegrationChannelClosing(t *testing.T) { // This function is run on every channel after it is successfully // opened. It can do something to verify something. It should be // quick; many channels may be opened! - f := func(t *testing.T, c ChannelInterface) { + f := func(t *testing.T, c *Channel) { return } @@ -497,7 +497,7 @@ func TestIntegrationChannelClosing(t *testing.T) { // multiple channels for _, n := range []int{2, 4, 8, 16, 32, 64, 128, 256} { - channels := make([]ChannelInterface, n) + channels := make([]*Channel, n) for i := 0; i < n; i++ { var err error if channels[i], err = c.Channel(); err != nil { @@ -1807,7 +1807,7 @@ func integrationConnection(t *testing.T, name string) *Connection { } // Returns a connection, channel and declares a queue when the AMQP_URL is in the environment -func integrationQueue(t *testing.T, name string) (*Connection, ChannelInterface) { +func integrationQueue(t *testing.T, name string) (*Connection, *Channel) { if conn := integrationConnection(t, name); conn != nil { if channel, err := conn.Channel(); err == nil { if _, err = channel.QueueDeclare(name, false, true, false, false, nil); err == nil { diff --git a/reconnect_test.go b/reconnect_test.go index 8905de02..e67325c2 100644 --- a/reconnect_test.go +++ b/reconnect_test.go @@ -8,7 +8,7 @@ import ( ) // Every connection should declare the topology they expect -func setup(url, queue string) (amqp.ConnectionInterface, amqp.ChannelInterface, error) { +func setup(url, queue string) (*amqp.Connection, *amqp.Channel, error) { conn, err := amqp.Dial(url) if err != nil { return nil, nil, err @@ -26,7 +26,7 @@ func setup(url, queue string) (amqp.ConnectionInterface, amqp.ChannelInterface, return conn, ch, nil } -func consume(url, queue string) (amqp.ConnectionInterface, <-chan amqp.Delivery, error) { +func consume(url, queue string) (*amqp.Connection, <-chan amqp.Delivery, error) { conn, ch, err := setup(url, queue) if err != nil { return nil, nil, err