-
Notifications
You must be signed in to change notification settings - Fork 13
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
test: Add integration-tests for Invoke-AzSqlDatabaseMigration #232
test: Add integration-tests for Invoke-AzSqlDatabaseMigration #232
Conversation
👷 Deploy request for arcus-scripting pending review. 🔨 Explore the source changes: 8d7b044 |
Integration tests are failing because of a timeout while creating the connection to the Azure SQL database. Only one of those tests that have a dependency on SQL fail, the other tests succeed. This seems to be due to the fact that 'auto-pause' is enabled on the Azure SQL database that we use to run our tests against. We could workaround this by increasing the connection-timeout in the migrationscript, but maybe that's a bit overkill since it is only needed to make the tests succeed. Don't know if there are any other possibilities ? Maybe add some retry-functionality to the tests ? Or maybe add a 'warmup' section to the tests which is run only once right before our tests execute. In that warmup sequence we just try to open a connection to the DB. This should trigger the Azure SQL database to resume running. |
I changed the 'BeforeEach' block to a 'BeforeAll' block, and added a SQL command there which would cause the SQL DB to wake up. Next to that, I also specified a ConnectionTimeout parameter. We'll see if this works out. |
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.
This is already a great addition for the integration tests on the SQL migration script. Very nice! You seem to have solved to problem with the sleeping database too, that's great!
Thanks for taking the time for these tests. It already covers the major pathways we would need to test.
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
Tests are currently failing because a test that failed in the previous run, didn't properly clean up. This should be fixed now. can you try to re-trigger the pipeline @stijnmoreels ? |
/azp run CI - Arcus.Scripting |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Maybe indeed some description improvements, but otherwise, I think we're ready. Thanks for this! 💯
Oh, and my mention of the false positive remark.
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
src/Arcus.Scripting.Tests.Integration/Arcus.Scripting.Sql.tests.ps1
Outdated
Show resolved
Hide resolved
…s.ps1 Co-authored-by: stijnmoreels <[email protected]>
…s.ps1 Co-authored-by: stijnmoreels <[email protected]>
Do we need something else before this PR can be merged ? |
Thanks @fgheysels , for your hard work on this! 👍 |
Add addition integration tests for Invoke-AzSqlDatabaseMigration
#223