Skip to content

Commit 0806007

Browse files
Flattening Async Directory (#186)
Co-authored-by: Tom Romano <[email protected]>
1 parent 9cc02bc commit 0806007

20 files changed

+8
-3
lines changed

python-test-samples/README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,10 @@ These projects have excellent in-depth examples of unit and integration tests fo
2121
|[API Gateway REST with SAM](https://github.com/aws-samples/serverless-samples/tree/main/serverless-rest-api/python-rest-sam) [External] | An implementation of a backend REST API using Python and AWS SAM
2222

2323
## Test Asynchronous Architectures
24-
* In a synchronous system, a calling service makes a request to a receiving service and then blocks, waiting for the receiver to complete the operation and return a result. In contrast, in an **asynchronous system**, a caller makes a request to a receiving system, which typically returns an immediate acknowledgement but then performs the requested operation at a later time. Asynchronous systems are frequently designed using event-driven architectures. These types of systems have several advantages including increased reliability, greater control over load processing, and improved scalability. However, testing these systems can present unique challenges.
25-
* [Learn more about testing asynchronous architectures](./async-architectures)
24+
In a synchronous system, a calling service makes a request to a receiving service and then blocks, waiting for the receiver to complete the operation and return a result. In contrast, in an **asynchronous system**, a caller makes a request to a receiving system, which typically returns an immediate acknowledgement but then performs the requested operation at a later time. Asynchronous systems are frequently designed using event-driven architectures. These types of systems have several advantages including increased reliability, greater control over load processing, and improved scalability. However, testing these systems can present unique challenges.
25+
26+
[Click this link to learn more about testing asynchronous architectures](./README-ASYNC.md).
27+
28+
|Project|Description|
29+
|---|---|
30+
|[Asynchronous Lambda and DynamoDB](./async-lambda-dynamodb)|This project contains tests for an Asynchronous pattern using AWS Lambda and Amazon DynamoDB.|

python-test-samples/async-architectures/async-lambda-dynamodb/README.md renamed to python-test-samples/async-lambda-dynamodb/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Asynchronous Integration Test with Lambda Event Listener and DynamoDB
2-
You may use a variety of resource types to create the event listener for your asynchronous system under test ([more about event listeners](https://github.com/aws-samples/serverless-test-samples/tree/main/python-test-samples/async-architectures#create-event-listeners-in-test-environments)). We recommend starting with AWS Lambda and Amazon DynamoDB. DynamoDB creates a persistent storage resource that can enable long running tests or an aggregation of a set of results.
2+
You may use a variety of resource types to create the event listener for your asynchronous system under test ([more about event listeners](../README-ASYNC.md#configure-event-producers-and-event-listeners)). We recommend starting with AWS Lambda and Amazon DynamoDB. DynamoDB creates a persistent storage resource that can enable long running tests or an aggregation of a set of results.
33

44
In this pattern, a Lambda function is configured to be an event listener to receive the System Under Test's output data. DynamoDB is configured to be the event listener storage option. In Step 1 in the diagram below, the test establishes a long polling pattern with DynamoDB. In Step 2, the test sends input data to the asynchronous system under test. The async system processes the data and in Step 3 the the Lambda function receives the data and puts it into DynamoDB. The long poll queries DynamoDB and examines the result. We recommend writing tests for failure conditions including timeouts and malformed requests.
55

0 commit comments

Comments
 (0)