Add concurrent waitForCondition example, and add examples to cloud tests#268
Merged
Add concurrent waitForCondition example, and add examples to cloud tests#268
Conversation
zhongkechen
approved these changes
Mar 25, 2026
| public String handleRequest(Integer threshold, DurableContext context) { | ||
| var items = IntStream.range(0, 100).boxed().toList(); | ||
|
|
||
| var config = MapConfig.builder().maxConcurrency(50).build(); |
Contributor
There was a problem hiding this comment.
Can we make iterations and max concurrency input parameters?
Contributor
Author
There was a problem hiding this comment.
Will make an update to this PR
| var operationResults = allOperationsOutput.split(" \\| "); | ||
| assertEquals(100, operationResults.length); | ||
| for (var operationResult : operationResults) { | ||
| assertEquals("3", operationResult); |
Contributor
There was a problem hiding this comment.
can we assert the duration of waitForCondition operations?
Contributor
There was a problem hiding this comment.
This is local runner, never mind. We can assert the duration only in our cloud tests.
Contributor
Author
There was a problem hiding this comment.
Will make an update to this PR
Contributor
Author
There was a problem hiding this comment.
Added duration check for each operation in the cloud test
2 tasks
a9f3b69 to
28128dc
Compare
zhongkechen
previously approved these changes
Mar 26, 2026
28128dc to
dd12c31
Compare
zhongkechen
previously approved these changes
Mar 26, 2026
| Description: Concurrent Wait For Condition Example Function ARN | ||
| Value: !GetAtt ConcurrentWaitForConditionExampleFunction.Arn | ||
|
|
||
| ConcurrentWaitForConditionExampleFunctionName: |
Contributor
There was a problem hiding this comment.
I doubt if all these outputs are useful
dd12c31 to
64398c0
Compare
zhongkechen
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
N/A
Description
ConcurrentWaitForConditionExampleexample that uses map to run 100 concurrently.Demo/Screenshots
N/A
Checklist
Testing
Unit Tests
Have unit tests been written for these changes?
N/A
Integration Tests
Have integration tests been written for these changes?
N/A
Examples
Has a new example been added for the change? (if applicable)
Yes, there is a new
ConcurrentWaitForConditionExample.