TCPSocket specs hang if client doesn't connect
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- ruby
- Ambito
- networking, testing-qa
Direzione di ricerca
Leggi il fixture TCPSocket in library/socket/fixtures/classes.rb intorno alle righe 125-129, concentrandoti sull’arresto del server e su Thread#join. Esegui le test di TCPSocket#initialize con un client che non riesce a connettersi, quindi verifica che chiudere il server prima del join impedisca alla suite di bloccarsi e gestisca qualsiasi errore di doppia chiusura.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The TCPSocket#initialize specs will hang if the client socket does not connect to the server, since the shutdown for the server expects that it will have handled a request and be wrapping up here:
https://github.com/ruby/spec/blob/master/library/socket/fixtures/classes.rb#L125-L129
I found this while adding support for the new connect_timeout keyword; we do not support hash arguments on TCPSocket#initialize at the moment, so the socket never connects. This leaves the server waiting for an incoming connection, and the Thread#join above will hang the suite.
Perhaps we should actively try to close the server socket before we join the thread, and ignore any errors on the thread from a double-close? It would allow these specs to be a bit more robust when there are errors setting up the TCPSocket before connection.
- Lingua principale
- Ruby
- Stelle
- 622
- Fork
- 402
- Merge medio
- 14h 51m
- PR unite (30g)
- 6
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ruby/spec
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
Improving Marshal specs Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
palladius/rails8-app-on-gcp#145 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
rubocop/rubocop-rspec#2236 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
riscv/riscv-unified-db#2624 · 1 reazione ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100