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

PingUri_ShortTimeout_Success fails 5% of the time of server #12140

Closed
paul1956 opened this issue Sep 14, 2024 · 3 comments
Closed

PingUri_ShortTimeout_Success fails 5% of the time of server #12140

paul1956 opened this issue Sep 14, 2024 · 3 comments
Labels
disabled-test Tracking tests that have been disabled to prevent run failures. test-bug Problem in test source code (most likely)

Comments

@paul1956
Copy link
Contributor

Test

Microsoft.VisualBasic.Devices.Tests.Ping_ShortTimeout_Success()

Issue description

5% of the time the test fails in the server.
The minimum timeout is 1 and sometimes the test completes before the timeout

A workaround would be to ping something other then the local machine but I would need an allowed URL.

@paul1956 paul1956 added the untriaged The team needs to look at this issue in the next triage label Sep 14, 2024
@Tanya-Solyanik Tanya-Solyanik added test-bug Problem in test source code (most likely) disabled-test Tracking tests that have been disabled to prevent run failures. and removed untriaged The team needs to look at this issue in the next triage labels Sep 14, 2024
@Tanya-Solyanik
Copy link
Member

@paul1956 - do you have a stack trace?

Tanya-Solyanik pushed a commit that referenced this issue Sep 14, 2024
@paul1956
Copy link
Contributor Author

paul1956 commented Sep 14, 2024

@paul1956 - do you have a stack trace?

I am reviewing the test and with 1 (millisecond) as timeout it should not throw when pinging local server. But on test server 5% of the time it takes longer than 1 millisecond. If I use a different ping API, I can see it throw every time, it fails on my local machine with a value under 900 microseconds.
Normally the local ping is under 1 millisecond but on server 5% of the time it's longer.

The easy fix is to increase timeout to a bigger number. Testing the timeout is really the responsibility of system.Net.NetworkInformation.

I need to use the API with the Timeout to test VB code. I don't need to test the throw here.

I will do another PR to lengthen the timeout and close the issue.

@paul1956
Copy link
Contributor Author

@Tanya-Solyanik
#12146 has a fix so the test always passes.

I will close when fix is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disabled-test Tracking tests that have been disabled to prevent run failures. test-bug Problem in test source code (most likely)
Projects
None yet
Development

No branches or pull requests

2 participants