-
Notifications
You must be signed in to change notification settings - Fork 102
/
azsqs_test.go
139 lines (104 loc) · 2.55 KB
/
azsqs_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
package taskq_test
import (
"os"
"testing"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sqs"
"github.com/vmihailenco/taskq/v3"
"github.com/vmihailenco/taskq/v3/azsqs"
)
var accountID string
func init() {
accountID = os.Getenv("AWS_ACCOUNT_ID")
}
func awsSQS() *sqs.SQS {
return sqs.New(session.New())
}
func azsqsFactory() taskq.Factory {
return azsqs.NewFactory(awsSQS(), accountID)
}
func TestSQSConsumer(t *testing.T) {
t.Skip()
testConsumer(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-consumer"),
})
}
func TestSQSUnknownTask(t *testing.T) {
t.Skip()
testUnknownTask(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-unknown-task"),
})
}
func TestSQSFallback(t *testing.T) {
t.Skip()
testFallback(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-fallback"),
})
}
func TestSQSDelay(t *testing.T) {
t.Skip()
testDelay(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-delay"),
})
}
func TestSQSRetry(t *testing.T) {
t.Skip()
testRetry(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-retry"),
})
}
func TestSQSNamedMessage(t *testing.T) {
t.Skip()
testNamedMessage(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-named-message"),
})
}
func TestSQSCallOnce(t *testing.T) {
t.Skip()
testCallOnce(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-call-once"),
})
}
func TestSQSLen(t *testing.T) {
t.Skip()
testLen(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-queue-len"),
})
}
func TestSQSRateLimit(t *testing.T) {
t.Skip()
testRateLimit(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-rate-limit"),
})
}
func TestSQSErrorDelay(t *testing.T) {
t.Skip()
testErrorDelay(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-delayer"),
})
}
func TestSQSWorkerLimit(t *testing.T) {
t.Skip()
testWorkerLimit(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-worker-limit"),
})
}
func TestSQSInvalidCredentials(t *testing.T) {
t.Skip()
man := azsqs.NewFactory(awsSQS(), "123")
testInvalidCredentials(t, man, &taskq.QueueOptions{
Name: queueName("sqs-invalid-credentials"),
})
}
func TestSQSBatchConsumerSmallMessage(t *testing.T) {
t.Skip()
testBatchConsumer(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-batch-consumer-small-message"),
}, 100)
}
func TestSQSBatchConsumerLarge(t *testing.T) {
t.Skip()
testBatchConsumer(t, azsqsFactory(), &taskq.QueueOptions{
Name: queueName("sqs-batch-processor-large-message"),
}, 64000)
}