IronLanguages / IronLanguages/ironpython3

test_timeout fails on Mono

Open
#1,522 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module-socket Mono
Dominant language
C#
Stars
2.8k
Forks
316
Avg merge
1d 9h
Merged PRs (30d)
1

Description

There appears to be two failures (only tested on Linux but I assume the issues are the same on macOS)

  1. The timeout values (in Socket.SendTimeout) only being stored in tens of milliseconds:
>>> import _socket
>>> s = _socket.socket()
>>> s.settimeout(1.234)
>>> s.gettimeout()
1.24
  1. When certain operations timeout (e.g. recv), the SocketException.SocketErrorCode is SocketError.WouldBlock instead of SocketError.TimedOut so we end up with an OSError instead of a socket.timeout. See https://github.com/mono/mono/issues/20381

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the test_timeout case and inspect the Socket.SendTimeout and SocketException handling involved in the reported operations. Reproduce the Mono behavior, then verify that timeout values retain their precision and that timed-out operations produce SocketError.TimedOut and socket.timeout rather than OSError.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
networking, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.