AcceptEncodingWireTests fail on Windows, 15 of 16, with a connection reset

Aperta Adatta ai principianti
#779 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@enigmatic-postulate ci sta già lavorando.

Dal 28/11/2026.

  • #780 di @enigmatic-postulate — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
testing-qa

Direzione di ricerca

I test che falliscono si trovano in AcceptEncodingWireTests (riga 162 di AcceptEncodingWireTests.cs) e nell'helper di test CapturingServer.DrainBodyAsync. Leggi DrainBodyAsync e verifica perché ritorna in anticipo quando non c'è Content-Length, lasciando non letti i corpi chunked. Esegui la classe di test filtrata su Windows per confermare che 15 test su 16 falliscono. Il lavoro è completato quando il caso chunked legge l'intero corpo e tutti i 16 test passano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug tests
Describe the bug

Running the AcceptEncodingWireTests class on Windows fails 15 tests, yielding SocketException 10054; only the compression-off test passes. These tests need no ClickHouse server.

Steps to reproduce

On Windows, from the repository root:

dotnet test ClickHouse.Driver.Tests/ClickHouse.Driver.Tests.csproj --framework net10.0 -c Release --filter "FullyQualifiedName~AcceptEncodingWireTests"
Expected behaviour

All 16 tests pass

Root cause
  • When compression is enabled the driver sends the body through CompressedContent without a known length. The request becomes chunked and has no Content-Length.
  • CapturingServer.DrainBodyAsync returns early when there's no Content-Length, leaving the body unread.
  • The server writes its response and closes the socket with unread data. Windows resets the connection and the client fails before reading a response
  • The test that passes explicitly turns compression off, so there is a Content-Length
Transfer-Encoding: chunked | Content-Type: text/sql | Content-Encoding: gzip
Error log
System.Net.Http.HttpRequestException : An error occurred while sending the request.
  ----> System.IO.IOException : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
  ----> System.Net.Sockets.SocketException : An existing connection was forcibly closed by the remote host.
  SocketErrorCode: ConnectionReset
  ErrorCode: 10054
   at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)
   at ClickHouse.Driver.Tests.Http.AcceptEncodingWireTests.WireAcceptEncodingAsync(...) AcceptEncodingWireTests.cs:line 162
Configuration
Environment
  • Client version: main at commit 63dc6d3
  • Language version: C#
  • .NET version: runtime 10.0.15, SDK 10.0.404
  • OS: Windows 11, build 10.0.26300, x64
Additional context

The tests were added in #490 and appear never to have passed on Windows. The test workflows run on Linux and macOS, which is why CI doesn't show it. I have a fix for the test helper and will open a pull request.

Lingua principale
C#
Stelle
101
Fork
28
Merge medio
2g 11h
PR unite (30g)
30

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ClickHouse/clickhouse-cs

Tutte le issue di ClickHouse/clickhouse-cs

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.