dsccommunity / ComputerManagementDsc

DSC resources for for configuration of a Windows computer. These DSC resources allow you to perform computer management tasks, such as renaming the computer, joining a domain and scheduling tasks as well as configuring items such as virtual memory, event logs, time zones and power settings.
https://dsccommunity.org
MIT License
306 stars 83 forks source link

Improve Integration Test Reliability #329

Closed PlagueHO closed 4 years ago

PlagueHO commented 4 years ago

Closing and reopening to kick of the tests again since it failed on. I have seen this when the previous run is to fast to the LCM haven't time to cooldown.

CimException: Cannot invoke the Get-DscConfiguration cmdlet. The Consistency Check or Pull
cmdlet is in progress and must return before Get-DscConfiguration can be invoked. Use -Force 
option if that is available to cancel the current operation.

https://dev.azure.com/dsccommunity/ComputerManagementDsc/_build/results?buildId=1818&view=logs&j=bed57fa5-efa2-5e6c-3967-59915169b168&t=5a0501c2-c194-508e-8f56-358cb6bbc353&l=383

In xWebAdministration and SqlServerDsc I have added the following helper function between tests where this happens (not everywhere though). Might be better to add it to Initialize-TestEnvironment.

https://github.com/dsccommunity/SqlServerDsc/blob/fab9419549a490efab38e070e8eda40d2a10d531/tests/TestHelpers/CommonTestHelper.psm1#L398-L409