Skip to content

Commit dbe07e9

Browse files
committed
check if we get records back
1 parent c7777e5 commit dbe07e9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/aws/services/kinesis/test_kinesis.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,16 +420,20 @@ def test_get_records_shard_iterator_with_surrounding_quotes(
420420
stream_name = kinesis_create_stream(ShardCount=1)
421421
wait_for_stream_ready(stream_name)
422422

423+
aws_client.kinesis.put_records(
424+
StreamName=stream_name, Records=[{"Data": b"Hello world", "PartitionKey": "1"}]
425+
)
426+
423427
first_stream_shard_data = aws_client.kinesis.describe_stream(StreamName=stream_name)[
424428
"StreamDescription"
425429
]["Shards"][0]
426430
shard_id = first_stream_shard_data["ShardId"]
427431

428432
shard_iterator = aws_client.kinesis.get_shard_iterator(
429-
StreamName=stream_name, ShardIteratorType="LATEST", ShardId=shard_id
433+
StreamName=stream_name, ShardIteratorType="TRIM_HORIZON", ShardId=shard_id
430434
)["ShardIterator"]
431435

432-
aws_client.kinesis.get_records(ShardIterator=f'"{shard_iterator}"')
436+
assert aws_client.kinesis.get_records(ShardIterator=f'"{shard_iterator}"')["Records"]
433437

434438

435439
@pytest.fixture

0 commit comments

Comments
 (0)