Skip to content

Commit

Permalink
[to be removed] test
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed Oct 10, 2024
1 parent 54a5b63 commit 2aa48dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions shard_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ func getRecords(k kinesisiface.KinesisAPI, streamName string, shardID string, it
ShardIterator: aws.String(iterator),
}

// sleep for 5 minutes + 5 sec, to make sure the shard iterator expires
fmt.Println("Sleeping for 305 seconds")
fmt.Printf("pre-sleep time.Now: %s\n", time.Now().Format(time.RFC3339))
time.Sleep(305 * time.Second)
fmt.Printf("post-sleep time.Now: %s\n", time.Now().Format(time.RFC3339))

output, err := k.GetRecords(params)

if err != nil {
Expand Down

0 comments on commit 2aa48dd

Please sign in to comment.