Skip to content

Update macOS logging tests to use wait logic instead of Start-Sleep #7462

@dantraMSFT

Description

@dantraMSFT

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

Metadata

Metadata

Assignees

Labels

Resolution-No ActivityIssue has had no activity for 6 months or moreWG-Quality-Testissues in a test or in test infrastructure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions