From 397df14a44d737853d37acd74a8bb7b1b092e03e Mon Sep 17 00:00:00 2001 From: Davide Angelocola Date: Sun, 21 Jun 2026 12:25:29 +0200 Subject: [PATCH] test(reader): cover VortexHttpReader.open(uri, registry) overload The CLIENT -> DEFAULT_HTTP_CLIENT rename marked the two-arg open() delegation as new code; it was the only uncovered new line, dragging SonarCloud new-code coverage to 50% and failing the quality gate. The one- and three-arg overloads were already covered (IT + mock-client unit tests); this adds an IT for the two-arg overload. Co-Authored-By: Claude Opus 4.8 --- .../dfa1/vortex/reader/VortexHttpReaderIT.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/reader/src/test/java/io/github/dfa1/vortex/reader/VortexHttpReaderIT.java b/reader/src/test/java/io/github/dfa1/vortex/reader/VortexHttpReaderIT.java index da3c087b..061473ac 100644 --- a/reader/src/test/java/io/github/dfa1/vortex/reader/VortexHttpReaderIT.java +++ b/reader/src/test/java/io/github/dfa1/vortex/reader/VortexHttpReaderIT.java @@ -61,6 +61,21 @@ void open_remoteFile_layoutRowCountIsPositive() throws Exception { } } + @Test + void open_withCustomRegistry_parsesMetadata() throws Exception { + // Given the two-arg overload: caller supplies a registry, default shared HttpClient. + // The three-arg overload is exercised by the mock-client unit tests, but this + // delegating overload was otherwise untested. + + // When + try (var sut = VortexHttpReader.open(FOR_ARRAY, ReadRegistry.loadAll())) { + + // Then + assertThat(sut.version()).isEqualTo(1); + assertThat(sut.dtype()).isNotNull(); + } + } + @Test void scan_forVortex_decodesAllRows() throws Exception { // Given