@@ -30,7 +30,7 @@ func (m mockMessage) Bytes() []byte {
30
30
31
31
func TestShutdownWorkFlow (t * testing.T ) {
32
32
w := NewWorker (
33
- WithSubj ("test" ),
33
+ WithQueue ("test" ),
34
34
)
35
35
q , err := queue .NewQueue (
36
36
queue .WithWorker (w ),
@@ -50,7 +50,7 @@ func TestCustomFuncAndWait(t *testing.T) {
50
50
Message : "foo" ,
51
51
}
52
52
w := NewWorker (
53
- WithSubj ("test" ),
53
+ WithQueue ("test" ),
54
54
WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
55
55
log .Println ("show message: " + string (m .Bytes ()))
56
56
time .Sleep (500 * time .Millisecond )
@@ -99,7 +99,7 @@ func TestJobReachTimeout(t *testing.T) {
99
99
Message : "foo" ,
100
100
}
101
101
w := NewWorker (
102
- WithSubj ("JobReachTimeout" ),
102
+ WithQueue ("JobReachTimeout" ),
103
103
WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
104
104
for {
105
105
select {
@@ -135,7 +135,7 @@ func TestCancelJobAfterShutdown(t *testing.T) {
135
135
Message : "test" ,
136
136
}
137
137
w := NewWorker (
138
- WithSubj ("CancelJob" ),
138
+ WithQueue ("CancelJob" ),
139
139
WithLogger (queue .NewLogger ()),
140
140
WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
141
141
for {
@@ -172,7 +172,7 @@ func TestGoroutineLeak(t *testing.T) {
172
172
Message : "foo" ,
173
173
}
174
174
w := NewWorker (
175
- WithSubj ("GoroutineLeak" ),
175
+ WithQueue ("GoroutineLeak" ),
176
176
WithLogger (queue .NewEmptyLogger ()),
177
177
WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
178
178
for {
@@ -216,7 +216,7 @@ func TestGoroutinePanic(t *testing.T) {
216
216
Message : "foo" ,
217
217
}
218
218
w := NewWorker (
219
- WithSubj ("GoroutinePanic" ),
219
+ WithQueue ("GoroutinePanic" ),
220
220
WithRoutingKey ("GoroutinePanic" ),
221
221
WithExchangeName ("GoroutinePanic" ),
222
222
WithRunFunc (func (ctx context.Context , m core.QueuedMessage ) error {
0 commit comments