KCL: Fix unit test
Fix code bug for removing cyclic dependency and fix unit test. Test: hmake test Change-Id: Ib4d4ba416d0133542e6459459ddf43079ff53ab8
This commit is contained in:
parent
425daf70ce
commit
1969713863
11 changed files with 26 additions and 34 deletions
|
|
@ -19,5 +19,5 @@ func TestConfig(t *testing.T) {
|
||||||
WithRegionName("us-west-2")
|
WithRegionName("us-west-2")
|
||||||
|
|
||||||
assert.Equal(t, "appName", kclConfig.ApplicationName)
|
assert.Equal(t, "appName", kclConfig.ApplicationName)
|
||||||
assert.Equal(t, "500", kclConfig.FailoverTimeMillis)
|
assert.Equal(t, 500, kclConfig.FailoverTimeMillis)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -151,4 +151,3 @@ func (c *KinesisClientLibConfiguration) WithWorkerThreadPoolSize(n int) *Kinesis
|
||||||
c.WorkerThreadPoolSize = n
|
c.WorkerThreadPoolSize = n
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
package types
|
package interfaces
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ks "github.com/aws/aws-sdk-go/service/kinesis"
|
ks "github.com/aws/aws-sdk-go/service/kinesis"
|
||||||
|
|
||||||
. "clientlibrary/interfaces"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -2,8 +2,6 @@ package interfaces
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ks "github.com/aws/aws-sdk-go/service/kinesis"
|
ks "github.com/aws/aws-sdk-go/service/kinesis"
|
||||||
|
|
||||||
. "clientlibrary/types"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
package interfaces
|
package interfaces
|
||||||
|
|
||||||
import (
|
|
||||||
. "clientlibrary/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
// IRecordProcessor is the interface for some callback functions invoked by KCL will
|
// IRecordProcessor is the interface for some callback functions invoked by KCL will
|
||||||
// The main task of using KCL is to provide implementation on IRecordProcessor interface.
|
// The main task of using KCL is to provide implementation on IRecordProcessor interface.
|
||||||
// Note: This is exactly the same interface as Amazon KCL IRecordProcessor v2
|
// Note: This is exactly the same interface as Amazon KCL IRecordProcessor v2
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package types
|
package interfaces
|
||||||
|
|
||||||
// ExtendedSequenceNumber represents a two-part sequence number for records aggregated by the Kinesis Producer Library.
|
// ExtendedSequenceNumber represents a two-part sequence number for records aggregated by the Kinesis Producer Library.
|
||||||
//
|
//
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package checkpoint
|
package checkpoint
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "clientlibrary/types"
|
. "clientlibrary/interfaces"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package impl
|
package impl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "clientlibrary/types"
|
. "clientlibrary/interfaces"
|
||||||
)
|
)
|
||||||
|
|
||||||
// KinesisClientLease is a Lease subclass containing KinesisClientLibrary related fields for checkpoints.
|
// KinesisClientLease is a Lease subclass containing KinesisClientLibrary related fields for checkpoints.
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ local_go_pkgs() {
|
||||||
grep -Fv '/tmp/' | \
|
grep -Fv '/tmp/' | \
|
||||||
grep -Fv '/run/' | \
|
grep -Fv '/run/' | \
|
||||||
grep -Fv '/tests/' | \
|
grep -Fv '/tests/' | \
|
||||||
|
sed -r 's|(.+)/[^/]+\.go$|\1|g' | \
|
||||||
sort -u
|
sort -u
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue