@@ -30,7 +30,7 @@ func (m mockMessage) Bytes() []byte {
3030
3131func TestShutdownWorkFlow (t * testing.T ) {
3232 w := NewWorker (
33- WithSubj ("test" ),
33+ WithQueue ("test" ),
3434 )
3535 q , err := queue .NewQueue (
3636 queue .WithWorker (w ),
@@ -50,7 +50,7 @@ func TestCustomFuncAndWait(t *testing.T) {
5050 Message : "foo" ,
5151 }
5252 w := NewWorker (
53- WithSubj ("test" ),
53+ WithQueue ("test" ),
5454 WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
5555 log .Println ("show message: " + string (m .Bytes ()))
5656 time .Sleep (500 * time .Millisecond )
@@ -99,7 +99,7 @@ func TestJobReachTimeout(t *testing.T) {
9999 Message : "foo" ,
100100 }
101101 w := NewWorker (
102- WithSubj ("JobReachTimeout" ),
102+ WithQueue ("JobReachTimeout" ),
103103 WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
104104 for {
105105 select {
@@ -135,7 +135,7 @@ func TestCancelJobAfterShutdown(t *testing.T) {
135135 Message : "test" ,
136136 }
137137 w := NewWorker (
138- WithSubj ("CancelJob" ),
138+ WithQueue ("CancelJob" ),
139139 WithLogger (queue .NewLogger ()),
140140 WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
141141 for {
@@ -172,7 +172,7 @@ func TestGoroutineLeak(t *testing.T) {
172172 Message : "foo" ,
173173 }
174174 w := NewWorker (
175- WithSubj ("GoroutineLeak" ),
175+ WithQueue ("GoroutineLeak" ),
176176 WithLogger (queue .NewEmptyLogger ()),
177177 WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
178178 for {
@@ -216,7 +216,7 @@ func TestGoroutinePanic(t *testing.T) {
216216 Message : "foo" ,
217217 }
218218 w := NewWorker (
219- WithSubj ("GoroutinePanic" ),
219+ WithQueue ("GoroutinePanic" ),
220220 WithRoutingKey ("GoroutinePanic" ),
221221 WithExchangeName ("GoroutinePanic" ),
222222 WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
0 commit comments