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 @@ -788,7 +788,7 @@ class DigestChallengeHandlerTest {
assertEquals(threadCount * iterationsPerThread, collected.max())
}

// ---- AtomicLong overflow safety (H4) ----------------------------------------
// ---- AtomicLong overflow safety ----------------------------------------

@Test
fun `nc counter past Int MAX_VALUE stays positive and well-formed`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class AsyncInstrumentationStepTest {

@Test
fun `http_response event carries trace_id from MDC set by span scope`() {
// B5: verify that the response event captured by FakeSlf4jLogger carries trace.id.
// Verify that the response event captured by FakeSlf4jLogger carries trace.id.
// We set up MDC before the pipeline call so the MdcSnapshot capture inside the
// use{} block picks up the trace.id installed by the span's makeCurrentWithLoggingContext.
installBasicMdcAdapter()
Expand Down Expand Up @@ -403,7 +403,7 @@ class AsyncInstrumentationStepTest {

@Test
fun `processAsync handles a synchronous throw from next as a failed future`() {
// B13: a next step whose processAsync throws synchronously must be normalised to a
// A next step whose processAsync throws synchronously must be normalised to a
// failed future; failure event emitted; span ended with the throwable.
val fakeSlf4j = FakeSlf4jLogger("test.async.sync.throw")
val clientLogger = ClientLogger.forTesting(fakeSlf4j)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class BearerTokenAuthStepTest {
private val nowInstant: Instant = Instant.parse("2026-01-01T12:00:00Z")
private val clock = FixedClock(nowInstant)

// ---- B14: fresh-token validation does NOT apply refreshMargin ----
// ---- fresh-token validation does NOT apply refreshMargin ----

/**
* B14: A provider that returns a token whose expiresAt is within the refreshMargin of
* A provider that returns a token whose expiresAt is within the refreshMargin of
* `now` is considered misbehaving — it minted a token that would immediately be treated
* as expired on the next request. The [BearerTokenAuthStep] must throw
* [IllegalStateException] even though the token is technically not yet expired (it is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ class RedirectStepTest {

@Test
fun `stripping userinfo preserves percent-encoding in path and query`() {
// L3: clearing the userinfo must not re-encode the Location. A path segment carrying
// Clearing the userinfo must not re-encode the Location. A path segment carrying
// %2F and a query value carrying %26 must survive verbatim — rebuilding via URI's
// decoded multi-arg constructor would turn %2F into '/' and %26 into '&', silently
// changing the path/query structure of the reissued request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ class RetryStepTest {

@Test
fun `throwing shouldRetryCondition closes the retryable response before propagating`() {
// M6: the should-retry predicate runs while the retryable response is still open. If it
// The should-retry predicate runs while the retryable response is still open. If it
// throws, the response must be closed before the exception propagates — otherwise the
// 5xx response's socket/buffer leaks. Assert both the close() is observed and the
// exception still surfaces.
Expand Down Expand Up @@ -1063,7 +1063,7 @@ class RetryStepTest {

@Test
fun `throwing computeResponseDelay override closes the retryable response before propagating`() {
// M6: a subclass override of computeResponseDelay runs after the predicate approves the
// A subclass override of computeResponseDelay runs after the predicate approves the
// retry, while the response is still open. If it throws, the response must be closed
// before the exception propagates.
val closes = AtomicInteger(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class LoggableResponseBodyTest {
}
}

// ----- H2: source() that throws before entering .use {} -----
// ----- source() that throws before entering .use {} -----

@Test
fun `when delegate source() itself throws close() still closes the delegate`() {
Expand Down Expand Up @@ -166,7 +166,7 @@ class LoggableResponseBodyTest {
)
}

// ----- A12: additional failure-semantics tests -----
// ----- additional failure-semantics tests -----

@Test
fun `source() after drainError is set re-throws the cached exception`() {
Expand Down Expand Up @@ -271,7 +271,7 @@ class LoggableResponseBodyTest {
)
}

// ----- H1: bounded capture + live-tail behavior -----
// ----- bounded capture + live-tail behavior -----

@Test
fun `over-cap body returns the full bytes to the consumer while snapshot is bounded`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ServerSentEventExtensionsTest {

private fun source(text: String): BufferedSource = Io.provider.source(text.toByteArray(Charsets.UTF_8))

// ----- A13 cases -----
// ----- readServerSentEvents() sequence behavior -----

@Test
fun `valid stream of two events yields the expected ServerSentEvent sequence`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ class LoggingEventTest {
assertContains(rendered, "anon-msg")
}

// -- MDC allow-list (B9) ------------------------------------------------------------------
// -- MDC allow-list ------------------------------------------------------------------

@Test
fun `default allow-list folds only trace_id and span_id from MDC`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class TeeSinkTest {
assertContentEquals("2345".toByteArray(), tap.snapshot())
}

// ----- M4: bounded tap (tapLimit) -----
// ----- bounded tap (tapLimit) -----

@Test
fun `tapLimit caps the tap but forwards the full payload to primary - typed write`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ class FuturesTest {

@Test
fun `unwrap walks an arbitrarily-deep wrapper chain to the leaf`() {
// 20 levels: matches the deep-chain test pattern in RetryUtilsTest after M4 removed
// the MAX_DEPTH cap. The HashSet-based cycle guard replaces the depth cap, so a
// long-but-acyclic chain unwraps fully to the IOException leaf.
// 20 levels: unwrap has no fixed depth cap — a HashSet-based cycle guard replaces any
// MAX_DEPTH limit, so a long-but-acyclic chain unwraps fully to the IOException leaf.
val leaf = IOException("leaf")
var current: Throwable = leaf
repeat(20) { current = CompletionException("wrap-$it", current) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class OkioBufferedSourceTest {
assertFailsWith<IllegalStateException> { slice.readByte() }
}

// ----- close-flag isolation (H6) -----
// ----- close-flag isolation -----

@Test
fun `closing a peek view does not prevent root from closing its delegate`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class JdkHttpTransportTest {
}
}

// -------- streaming publisher re-subscription (H4) --------
// -------- streaming publisher re-subscription --------

@Test
fun `streamingPublisherSurvivesResubscription`() {
Expand Down Expand Up @@ -432,7 +432,7 @@ class JdkHttpTransportTest {
)
}

// -------- proxy challengeHandler (M7) --------
// -------- proxy challengeHandler --------

@Test
fun `proxyChallengeHandlerIsAcceptedAndSurfacedAsUnsupported`() {
Expand Down Expand Up @@ -821,7 +821,7 @@ class JdkHttpTransportTest {
}
}

/** Minimal [org.dexpace.sdk.core.http.auth.ChallengeHandler] stub for the M7 acceptance test. */
/** Minimal [org.dexpace.sdk.core.http.auth.ChallengeHandler] stub for the proxy challenge-handler acceptance test. */
private object NoopChallengeHandler : org.dexpace.sdk.core.http.auth.ChallengeHandler {
override fun handleChallenges(
method: Method,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ class OkHttpTransportTest {

@Test
fun asyncResponseThatLosesTheRaceIsClosed() {
// L1: the consumer can complete/cancel the returned future in the window *between* OkHttp
// The consumer can complete/cancel the returned future in the window *between* OkHttp
// finishing the exchange and Callback.onResponse adapting it. In that race
// `future.complete(adapted)` returns false and nothing else will ever close `adapted` — a
// live connection — so the transport must close it. We reproduce the race deterministically
Expand Down Expand Up @@ -527,7 +527,7 @@ class OkHttpTransportTest {

@Test
fun proxyChallengeHandlerIsAcceptedAndIgnored() {
// M7: ProxyOptions.challengeHandler is not honoured by the OkHttp transport. Building a
// ProxyOptions.challengeHandler is not honoured by the OkHttp transport. Building a
// transport with one set must be accepted (it logs a loud WARNING and falls back to Basic
// auth from username/password) rather than throwing. We point the proxy at the
// MockWebServer so the built transport still routes a normal request through it, proving
Expand Down
Loading