-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
The macOS logging tests launch a PowerShell instance and examine the logs after the launched process exits. There is a possible race condition between the process exiting and the logging is captured that cause the tests to fail.
A Start-Sleep workaround has been added but more reliable wait logic should be considered in either the tests or in PSSysLog.psm1.
The tests in question include:
'Verifies basic logging with no customizations' - expects 2 log items and should wait with a timeout for two items.
'Verifies logging level filtering works' - currently expects no log items. Consider updating to execute a script that forces at least one warning or error log item.
In addition, the logid should be explicitly used to verify the expected count since Travis was seeing other non-powershell log entries produced in the powershell process