Skip to content
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

PSBreakpoint make Pester tests extremely slow #1352

Closed
ili101 opened this issue Aug 19, 2019 · 2 comments
Closed

PSBreakpoint make Pester tests extremely slow #1352

ili101 opened this issue Aug 19, 2019 · 2 comments

Comments

@ili101
Copy link

ili101 commented Aug 19, 2019

1. General summary of the issue

When session have any type of PSBreakpoint Pester becomes extremely slow even when the break point never gets activated and even when it's outside the test.

2. Describe Your Environment

Pester version : 4.8.1 D:\ILI\Profile\Documents\WindowsPowerShell\Modules\Pester\4.8.1\Pester.psd1
PowerShell version : 5.1.17763.592
OS version : Microsoft Windows NT 10.0.17763.0

3. Expected Behavior

Breakpoint will not effect preference.

4.Current Behavior

Set-PSBreakpoint -Variable NotEvenUsed
Describe 'Test' {
    for ($i = 0; $i -lt 10; $i++) {
        Context 'Context' {
            It "10 Tests" {
                1 | Should -Be 1
            }
        }
    }
}

Test with the Breakpoint takes ~20 Seconds, Without it it's less then ~100 Milliseconds

@nohwnd
Copy link
Member

nohwnd commented Aug 19, 2019

Thank you for the report, this issue affects some builds of windows and is reported in issue #1318. It should currently be fixed in the latest beta of PowerShell 7 and later back-ported to PowerShell 5.1 (without any promises about when that will be done).

@ili101
Copy link
Author

ili101 commented Aug 19, 2019

Thank you, Somehow didn't see this issue. I can confirm that with the Nightly version the test is only twice as slow for my code instead of 25 times slower 👍

@ili101 ili101 closed this as completed Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants