Skip to content

Commit 1acbfb0

Browse files
authored
Merge pull request #19 from ibm-messaging/local-queue-name
Update bindings test queue name
2 parents da7d5fd + 71a376c commit 1acbfb0

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

local_bindings_test.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,25 @@ package main
1111

1212
import (
1313
"fmt"
14-
"github.com/ibm-messaging/mq-golang-jms20/mqjms"
15-
"github.com/stretchr/testify/assert"
1614
"os"
1715
"testing"
16+
17+
"github.com/ibm-messaging/mq-golang-jms20/mqjms"
18+
"github.com/stretchr/testify/assert"
1819
)
1920

2021
/*
2122
* Test the use of a local bindings connection to the queue manager, as
2223
* opposed to a remote client connection.
2324
*
2425
* Assumes a locally running queue manager called QM1, with a defined local
25-
* queue called LOCAL.QUEUE
26+
* queue called DEV.QUEUE.1
27+
*
28+
* Note: if you wish to prove that conclusively that the connection is being
29+
* made using bindings then one approach is to create a unique queue name such
30+
* as MY.LOCAL.QUEUE that exists only on the local queue manager, and update the
31+
* string name below to match - so that it cannot be confused with any other
32+
* queue manager that you might be able to connect to as a client.
2633
*/
2734
func TestLocalBindingsConnect(t *testing.T) {
2835

@@ -51,7 +58,7 @@ func TestLocalBindingsConnect(t *testing.T) {
5158
assert.NotNil(t, context)
5259

5360
// Equivalent to a JNDI lookup or other declarative definition
54-
queue := context.CreateQueue("LOCAL.QUEUE")
61+
queue := context.CreateQueue("DEV.QUEUE.1")
5562

5663
// Set up the consumer ready to receive messages.
5764
consumer, conErr := context.CreateConsumer(queue)

0 commit comments

Comments
 (0)