Add ability to write integration-tests for servers#4332
Conversation
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
e1e526e to
a70ce2c
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
402686b to
69a7e39
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
codegen-server-test/build.gradle.kts
Outdated
| java | ||
| alias(libs.plugins.smithy.gradle.base) | ||
| alias(libs.plugins.smithy.gradle.jar) | ||
| id("com.dorongold.task-tree") version "2.1.1" |
There was a problem hiding this comment.
should be consistent with how we define dependencies by placing them in the plugins section of libs.versions.toml
There was a problem hiding this comment.
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)
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
0e4d5af to
c35f13a
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
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.
c35f13a to
867ea1e
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
867ea1e to
7db1ad3
Compare
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
This
integration-testsdirectory makes it possible to writeRust 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::oncemethod for convenience. TheManualEventStreamsender 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.