Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy committed Dec 5, 2023
1 parent c6d47dc commit d6942f8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions nats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit d6942f8

Please sign in to comment.