-
Notifications
You must be signed in to change notification settings - Fork 475
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
Update Integration Tests #1540
Update Integration Tests #1540
Conversation
How do we ensure that the AddXyzContainer resources don't bit rot |
Other tests. These tests weren't ensuring those resources don't bit rot - because they weren't being used. |
Maybe one thing we could do next is add another bool to CreateTestProgram that would switch between Thoughts? |
tests/testproject/TestProject.IntegrationServiceA/SqlServer/SqlServerExtensions.cs
Show resolved
Hide resolved
I looked through some of the resource specific functional tests and they seem to rely on the TestProgram as well to spin up the containers. With this change none of them will be testing What the top level test relied upon (incorrectly in some instances) was the fact that we had healthchecks registered, so by hitting the healthcheck endpoint we could verify that the integrations were working (some components no-op healthchecks without additional config). |
We should get this merged @mitchdenny. What do you think is missing or needs to happen? |
We need to either break up the integration test so they are smaller and focused on smaller groups of components or we need to read the AddXYZContainer extensions. If we don't I don't think we've got an integration test that executes that code path. I think with a larger timeout and improved retry logic it should be okay. And if there is instability starting larger groups of services we want to know about it. In time I suspect that we'll end up with multiple integration test projects. |
13b85ab
to
8c8111e
Compare
@mitchdenny - can I get your eyes on this? The tests each pass individually on my machine. My next step will be to split the Aspire.Hosting.Tests apart. We will leave the "unit tests" for Aspire.Hosting in Aspire.Hosting.Tests. And these integration tests will move to a new "EndToEnd" functional tests by themselves. |
8c8111e
to
d21c569
Compare
tests/testproject/TestProject.IntegrationServiceA/MySql/MySqlExtensions.cs
Outdated
Show resolved
Hide resolved
1. Add retry / resilience logic to the services that have slow starting containers (MySQL, Oracle, and SqlServer). Each of these containers can take more than 30 seconds to start on my machine. 2. Remove unnecessary containers from the IntegrationServiceA project. Adding double the containers make the startup take even longer. So just use AddXYX resources and remove AddXYZContainer services. 3. A couple other cosmetic changes - Use "rabbitmq" vs. "rabbit" - Log the responseContent in the SqlServer test
…o start. Remove retries in Cosmos test. We don't need to retry at the test side, retries should be done inside the integration app.
Use non-Container overloads Only retry on connect.
d21c569
to
417b506
Compare
* Update Integration Tests 1. Add retry / resilience logic to the services that have slow starting containers (MySQL, Oracle, and SqlServer). Each of these containers can take more than 30 seconds to start on my machine. 2. Remove unnecessary containers from the IntegrationServiceA project. Adding double the containers make the startup take even longer. So just use AddXYX resources and remove AddXYZContainer services. 3. A couple other cosmetic changes - Use "rabbitmq" vs. "rabbit" - Log the responseContent in the SqlServer test * Add more time for Cosmos, since the emulator can take over a minute to start. Remove retries in Cosmos test. We don't need to retry at the test side, retries should be done inside the integration app. * PR feedback Use non-Container overloads Only retry on connect.
These connections were renamed in dotnet#1540, but were missed here.
These connections were renamed in #1540, but were missed here.
* Update Integration Tests 1. Add retry / resilience logic to the services that have slow starting containers (MySQL, Oracle, and SqlServer). Each of these containers can take more than 30 seconds to start on my machine. 2. Remove unnecessary containers from the IntegrationServiceA project. Adding double the containers make the startup take even longer. So just use AddXYX resources and remove AddXYZContainer services. 3. A couple other cosmetic changes - Use "rabbitmq" vs. "rabbit" - Log the responseContent in the SqlServer test * Add more time for Cosmos, since the emulator can take over a minute to start. Remove retries in Cosmos test. We don't need to retry at the test side, retries should be done inside the integration app. * PR feedback Use non-Container overloads Only retry on connect.
These connections were renamed in dotnet#1540, but were missed here.
This won't be the last refactoring to these tests, but I think it is a step in the right direction.
Microsoft Reviewers: Open in CodeFlow