Skip to content

Add ability to write integration-tests for servers#4332

Merged
rcoh merged 3 commits intomainfrom
initial-requestresponse
Oct 8, 2025
Merged

Add ability to write integration-tests for servers#4332
rcoh merged 3 commits intomainfrom
initial-requestresponse

Conversation

@rcoh
Copy link
Collaborator

@rcoh rcoh commented Oct 4, 2025

Motivation and Context

This integration-tests directory makes it possible to write
Rust code that you can run directly against the generated servers
from the protocol test models. This makes it easier to test things
like event streams behavior and other specifics that are hard to
test with protocol tests alone.

Description

I added a test for #4325 (showing the broken behavior) that we can use when we fix this issue. This will also make it easy to test a number of other open issues that have been found.

To make this easy I also added a EventStreamSender::once method for convenience. The ManualEventStream sender could be upstreamed at a later date so it is more broadly usable but I didn't want to pin down a public API for it right now.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link

github-actions bot commented Oct 4, 2025

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh force-pushed the initial-requestresponse branch from e1e526e to a70ce2c Compare October 6, 2025 14:23
@rcoh rcoh marked this pull request as ready for review October 6, 2025 14:24
@rcoh rcoh requested review from a team as code owners October 6, 2025 14:24
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh force-pushed the initial-requestresponse branch 4 times, most recently from 402686b to 69a7e39 Compare October 6, 2025 16:40
@rcoh rcoh requested a review from drganjoo October 6, 2025 16:57
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh requested a review from aajtodd October 6, 2025 17:27
java
alias(libs.plugins.smithy.gradle.base)
alias(libs.plugins.smithy.gradle.jar)
id("com.dorongold.task-tree") version "2.1.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be consistent with how we define dependencies by placing them in the plugins section of libs.versions.toml

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh derp, let me back this change out actually. I didn't mean to add this in the final version (unless you want to keep it in)

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh force-pushed the initial-requestresponse branch from 0e4d5af to c35f13a Compare October 8, 2025 15:10
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

A new generated diff is ready to view.

A new doc preview is ready to view.

rcoh added 2 commits October 8, 2025 12:03
Adds a convenience method to create an EventStreamSender from a single item.
This is useful for creating event streams with just one event.

- Added futures-util dependency for stream::once
- Added Send + Sync bounds to T for thread safety
- Added test to verify functionality
- Bumped version to 0.62.4
This `integration-tests` directory makes it possible to write
Rust code that you can run directly against the generated servers
from the protocol test models. This makes it easier to test things
like event streams behavior and other specifics that are hard to
test with protocol tests alone.
@rcoh rcoh force-pushed the initial-requestresponse branch from c35f13a to 867ea1e Compare October 8, 2025 16:06
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh force-pushed the initial-requestresponse branch from 867ea1e to 7db1ad3 Compare October 8, 2025 16:52
@rcoh rcoh enabled auto-merge (squash) October 8, 2025 17:13
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh merged commit a87ffdf into main Oct 8, 2025
50 checks passed
@rcoh rcoh deleted the initial-requestresponse branch October 8, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants