-
Notifications
You must be signed in to change notification settings - Fork 0
feat(testing-sdk): add dual-mode integration testing infrastructure #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d322404 to
e3782ca
Compare
87f2155 to
dad2b53
Compare
a1457da to
c5d1d71
Compare
df1b670 to
3aa49a6
Compare
Add comprehensive integration testing infrastructure that supports both local (in-memory) and cloud (AWS Lambda) test execution modes with a unified test interface.
3aa49a6 to
3a1eb08
Compare
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved w/ comments
| def simulated_get_item(name: str) -> dict[str, Any] | None: | ||
| """Simulate getting an item that may fail randomly.""" | ||
| # Fail 50% of the time | ||
| if random() < 0.5: # noqa: S311 | ||
| msg = "Random failure" | ||
| raise RuntimeError(msg) | ||
|
|
||
| # Simulate finding item after some attempts | ||
| if random() > 0.3: # noqa: S311 | ||
| return {"id": name, "data": "item data"} | ||
|
|
||
| return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we introduce randomness like this, we should seed the random so that we don't get transient failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So either seeding, or mocking the response and knowing the sequence. I prefer large sequence of randoms tested over multiple seeds.
Add comprehensive integration testing infrastructure that supports both local (in-memory) and cloud (AWS Lambda) test execution modes with a unified test interface.
Issue #, if available:
Description of changes:
Key Features:
New Infrastructure:
Configuration Updates: