vmware-go-kcl-v2/src/vmware.com/cascade-kinesis-client/clientlibrary/config/config_test.go
Tao Jiang 6384d89748 KCL: Organize the folder structure
Organize the folder structure in order to support imported as
submodule for other services.

Jira CNA-701

Change-Id: I1dda27934642bb8a7755df07dc4a5048449afc86
2021-12-20 21:13:21 -06:00

22 lines
604 B
Go

package config
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestConfig(t *testing.T) {
kclConfig := NewKinesisClientLibConfig("appName", "StreamName", "us-west-2", "workerId").
WithFailoverTimeMillis(500).
WithMaxRecords(100).
WithInitialPositionInStream(TRIM_HORIZON).
WithIdleTimeBetweenReadsInMillis(20).
WithCallProcessRecordsEvenForEmptyRecordList(true).
WithTaskBackoffTimeMillis(10).
WithMetricsBufferTimeMillis(500).
WithMetricsMaxQueueSize(200)
assert.Equal(t, "appName", kclConfig.ApplicationName)
assert.Equal(t, 500, kclConfig.FailoverTimeMillis)
}