From 076017582943213940ba68f0a7fb0aef4a8e4791 Mon Sep 17 00:00:00 2001 From: Michael Sambol Date: Sat, 16 Mar 2024 08:18:11 -0600 Subject: [PATCH] update rosetta --- packages/@aws-cdk/aws-pipes-sources-alpha/README.md | 4 ---- packages/@aws-cdk/aws-pipes-sources-alpha/lib/dynamodb.ts | 2 +- .../aws-pipes-sources-alpha/rosetta/default.ts-fixture | 2 ++ .../@aws-cdk/aws-pipes-sources-alpha/test/integ.dynamodb.ts | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk/aws-pipes-sources-alpha/README.md b/packages/@aws-cdk/aws-pipes-sources-alpha/README.md index 84d7f3f019216..606c7824b1abd 100644 --- a/packages/@aws-cdk/aws-pipes-sources-alpha/README.md +++ b/packages/@aws-cdk/aws-pipes-sources-alpha/README.md @@ -66,8 +66,6 @@ const pipe = new pipes.Pipe(this, 'Pipe', { A Kinesis stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe. ```ts -import * as kinesis from 'aws-cdk-lib/aws-kinesis'; - declare const sourceStream: kinesis.Stream; declare const targetQueue: sqs.Queue; @@ -86,8 +84,6 @@ const pipe = new pipes.Pipe(this, 'Pipe', { A DynamoDB stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe. ```ts -import * as ddb from 'aws-cdk-lib/aws-dynamodb'; - const table = new ddb.TableV2(stack, 'MyTable', { partitionKey: { name: 'id', diff --git a/packages/@aws-cdk/aws-pipes-sources-alpha/lib/dynamodb.ts b/packages/@aws-cdk/aws-pipes-sources-alpha/lib/dynamodb.ts index 80e9e1db4328d..9c589dc681cd6 100644 --- a/packages/@aws-cdk/aws-pipes-sources-alpha/lib/dynamodb.ts +++ b/packages/@aws-cdk/aws-pipes-sources-alpha/lib/dynamodb.ts @@ -1,7 +1,7 @@ import { IPipe, ISource, SourceConfig } from '@aws-cdk/aws-pipes-alpha'; import { Duration } from 'aws-cdk-lib'; -import { IRole } from 'aws-cdk-lib/aws-iam'; import { ITableV2 } from 'aws-cdk-lib/aws-dynamodb'; +import { IRole } from 'aws-cdk-lib/aws-iam'; import { DeadLetterConfigParameters } from './deadLetterConfig'; import { DynamoDBStartingPosition, OnPartialBatchItemFailure } from './enums'; diff --git a/packages/@aws-cdk/aws-pipes-sources-alpha/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-pipes-sources-alpha/rosetta/default.ts-fixture index 28ddcf1809b92..d0b11899ad633 100644 --- a/packages/@aws-cdk/aws-pipes-sources-alpha/rosetta/default.ts-fixture +++ b/packages/@aws-cdk/aws-pipes-sources-alpha/rosetta/default.ts-fixture @@ -1,6 +1,8 @@ // Fixture with packages imported, but nothing else import * as cdk from 'aws-cdk-lib'; import * as sqs from 'aws-cdk-lib/aws-sqs'; +import * as kinesis from 'aws-cdk-lib/aws-kinesis'; +import * as ddb from 'aws-cdk-lib/aws-dynamodb'; import { Construct } from 'constructs'; import * as pipes from '@aws-cdk/aws-pipes-alpha'; import * as sources from '@aws-cdk/aws-pipes-sources-alpha'; diff --git a/packages/@aws-cdk/aws-pipes-sources-alpha/test/integ.dynamodb.ts b/packages/@aws-cdk/aws-pipes-sources-alpha/test/integ.dynamodb.ts index e3e25c9f5a0d2..f7bd672b194aa 100644 --- a/packages/@aws-cdk/aws-pipes-sources-alpha/test/integ.dynamodb.ts +++ b/packages/@aws-cdk/aws-pipes-sources-alpha/test/integ.dynamodb.ts @@ -61,8 +61,8 @@ const message = test.assertions.awsApiCall('SQS', 'receiveMessage', { QueueUrl: targetQueue.queueUrl, }); -message.assertAtPath('Messages.0.Body.dynamodb.Keys.id.S', ExpectedResult.exact('1')).waitForAssertions({ - totalTimeout: cdk.Duration.minutes(3), +message.assertAtPath('Messages.0.Body.dynamodb.Keys.id.S', ExpectedResult.stringLikeRegexp('"1"')).waitForAssertions({ + totalTimeout: cdk.Duration.minutes(2), interval: cdk.Duration.seconds(15), });