-
Notifications
You must be signed in to change notification settings - Fork 4
/
processor_test.go
47 lines (44 loc) · 1.01 KB
/
processor_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
package streaming
import (
"os"
"testing"
"github.com/Shopify/sarama"
cluster "github.com/bsm/sarama-cluster"
)
func TestStreaming_processor(t *testing.T) {
type fields struct {
SeedBrokers []string
Config *cluster.Config
InTopic []string
OutTopic []string
GroupID string
CallBack CallBack
Logger sarama.StdLogger
signals chan os.Signal
consumer *cluster.Consumer
producer sarama.AsyncProducer
}
tests := []struct {
name string
fields fields
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
s := &Streaming{
SeedBrokers: tt.fields.SeedBrokers,
Config: tt.fields.Config,
InTopic: tt.fields.InTopic,
OutTopic: tt.fields.OutTopic,
GroupID: tt.fields.GroupID,
CallBack: tt.fields.CallBack,
Logger: tt.fields.Logger,
signals: tt.fields.signals,
consumer: tt.fields.consumer,
producer: tt.fields.producer,
}
s.processor()
})
}
}