/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/powershell/Modules/Microsoft.PowerShell.Utility/Wait-Event.Tests.ps1
17 строк
606 B
Shuangchi He
Correct spelling in Comments and tests (#17480)
06 июн 2022, 19:55
Не верифицирован
06 июн 2022, 19:55
c5d31c9
Код
Авторство
О чём код?
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Describe "Wait-Event" -Tags "CI" { Context "Validate Wait-Event is waiting for events" { It "Should time out when it does not receive a FakeEvent" { # Don't depend on Measure-Command $stopwatch = [System.Diagnostics.Stopwatch]::startNew() # Testing the timeout, so wait for an event that will never be # raised because it is fake Wait-Event -Timeout 1 -SourceIdentifier "FakeEvent" $stopwatch.Stop() $stopwatch.ElapsedMilliseconds | Should -BeGreaterThan 500 $stopwatch.ElapsedMilliseconds | Should -BeLessThan 1500 } } }