Skip to content

Commit 34891d6

Browse files
dfa1claude
andcommitted
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 <noreply@anthropic.com>
1 parent 59ec2e2 commit 34891d6

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

reader/src/test/java/io/github/dfa1/vortex/reader/VortexHttpReaderIT.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,21 @@ void open_remoteFile_layoutRowCountIsPositive() throws Exception {
6161
}
6262
}
6363

64+
@Test
65+
void open_withCustomRegistry_parsesMetadata() throws Exception {
66+
// Given the two-arg overload: caller supplies a registry, default shared HttpClient.
67+
// The three-arg overload is exercised by the mock-client unit tests, but this
68+
// delegating overload was otherwise untested.
69+
70+
// When
71+
try (var sut = VortexHttpReader.open(FOR_ARRAY, ReadRegistry.loadAll())) {
72+
73+
// Then
74+
assertThat(sut.version()).isEqualTo(1);
75+
assertThat(sut.dtype()).isNotNull();
76+
}
77+
}
78+
6479
@Test
6580
void scan_forVortex_decodesAllRows() throws Exception {
6681
// Given

0 commit comments

Comments
 (0)