Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.api.parallel.Isolated;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

Expand Down Expand Up @@ -39,6 +40,10 @@
/// reader side of the wire format. CSV is read front to back in one streaming pass, so — unlike
/// the `parquet` module's Range-request-based `HttpInputFile` — a single plain GET response is
/// all that's needed here.
///
/// [Isolated]: it swaps the mock into `CsvImporter.httpClient`, a static field the whole JVM
/// shares, so no other class may run alongside it (the reader's twin of this seam raced).
@Isolated
@ExtendWith(MockitoExtension.class)
class CsvImporterHttpTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.github.dfa1.vortex.core.io.VortexFormat;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.parallel.Isolated;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

Expand All @@ -27,6 +28,11 @@
/// [VortexHttpReaderTailFetchTest]; this drives the two-arg overload to completion by
/// substituting the package-private default-client seam with a mocked client serving a
/// committed fixture, so it stays deterministic and network-free.
///
/// [Isolated]: the seam is a static field the whole JVM shares, and while the mock sits in it a
/// class running alongside (`VortexHttpReaderTailFetchTest` reads its redirect policy) saw the
/// mock.
@Isolated
@ExtendWith(MockitoExtension.class)
class VortexHttpReaderOpenOverloadTest {

Expand Down
Loading