diff --git a/nats_test.go b/nats_test.go index 76fc1f5..4058c0a 100644 --- a/nats_test.go +++ b/nats_test.go @@ -53,6 +53,27 @@ func TestDefaultFlow(t *testing.T) { q.Release() } +func TestClusteredHost(t *testing.T) { + m := &mockMessage{ + Message: "foo", + } + w := NewWorker( + WithAddr(host, "nats://localhost:4223"), + WithSubj("test"), + WithQueue("test"), + ) + q, err := queue.NewQueue( + queue.WithWorker(w), + queue.WithWorkerCount(1), + ) + assert.NoError(t, err) + assert.NoError(t, q.Queue(m)) + assert.NoError(t, q.Queue(m)) + q.Start() + time.Sleep(500 * time.Millisecond) + q.Release() +} + func TestShutdown(t *testing.T) { w := NewWorker( WithAddr(host),