mirror of https://github.com/certusone/dc4bc.git
fix kafka-tests
This commit is contained in:
parent
c53c371c51
commit
d36e24307e
|
@ -67,8 +67,22 @@ func TestKafkaStorage_SendBatch(t *testing.T) {
|
|||
N := 10
|
||||
var offset uint64 = 5
|
||||
|
||||
producerCreds := &KafkaAuthCredentials{
|
||||
Username: "producer",
|
||||
Password: "producerpass",
|
||||
}
|
||||
consumerCreds := &KafkaAuthCredentials{
|
||||
Username: "consumer",
|
||||
Password: "consumerpass",
|
||||
}
|
||||
|
||||
tlsConfig, err := GetTLSConfig("../kafka-docker/certs/ca.crt")
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
|
||||
req := require.New(t)
|
||||
stg, err := NewKafkaStorage(context.Background(), "localhost:9092", "test_topic")
|
||||
stg, err := NewKafkaStorage(context.Background(), "localhost:9093", "test", tlsConfig, producerCreds, consumerCreds)
|
||||
req.NoError(err)
|
||||
|
||||
msgs := make([]Message, 0, N)
|
||||
|
|
Loading…
Reference in New Issue