-
Notifications
You must be signed in to change notification settings - Fork 225
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
SqlDatabaseDefaultLocation: Integration tests fails itermittently when running on SQL Server 2022 #1837
Comments
If restarts the SQL Server and waits for ut to go online
the there is just one call to
Maybe it fails on the first connection attempt on this line, and that throws an unhandled exception:
If SqlServerDsc/source/DSCResources/DSC_SqlDatabaseDefaultLocation/DSC_SqlDatabaseDefaultLocation.psm1 Lines 209 to 210 in bed3b12
In Which is caught by the try-catch-block: SqlServerDsc/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1 Lines 571 to 572 in bed3b12
And that is the error we are seeing. |
In the function
I suggest we change the following lines to use SqlServerDsc/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1 Lines 571 to 572 in bed3b12
With But we should make sure to add |
- SqlServerDsc.Common - `Connect-SQL` - Was updated to handle both `-ErrorAction 'Stop'` and `-ErrorAction 'SilentlyContinue'` when passed to the command ([issue #1837]).
The integration tests for SqlDatabaseDefaultLocation fails itermittent with the exception
It seems to always happen when running the configuration
DSC_SqlDatabaseDefaultLocation_Data_Config
, that is the first integration tests for the resource. Looking at the test run it seems to always fail onStart-DscConfiguration
, but the next test that runsGet-DscConfiguration
and thenTest-DscConfiguration
both passes. It seems that it cannot, for some reason (lack of resources on the build worker?), access the SQL Server instance at that moment. Restarting the failed tests run will normally make it pass.Verbose logs:
The text was updated successfully, but these errors were encountered: