From 0c82018592282f14971d5253f638f5ae1c08e34d Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 15 Jun 2026 22:11:17 +0300 Subject: [PATCH] chore: remove internal short-code markers from test comments Several committed test comments carried review-style short-code prefixes (e.g. "H4", "M6", "L3", "B14") that have no meaning outside the review that produced them. This strips those prefixes while keeping the explanatory text, and rewrites the few headers/sentences that read awkwardly once the code was removed so each comment stands on its own. Comment-only change across sdk-core, sdk-io-okio3, sdk-transport-okhttp, and sdk-transport-jdkhttp test sources; no test names, assertions, logic, or public API are affected. --- .../sdk/core/http/auth/DigestChallengeHandlerTest.kt | 2 +- .../http/pipeline/steps/AsyncInstrumentationStepTest.kt | 4 ++-- .../sdk/core/http/pipeline/steps/BearerTokenAuthStepTest.kt | 4 ++-- .../sdk/core/http/pipeline/steps/RedirectStepTest.kt | 2 +- .../dexpace/sdk/core/http/pipeline/steps/RetryStepTest.kt | 4 ++-- .../sdk/core/http/response/LoggableResponseBodyTest.kt | 6 +++--- .../sdk/core/http/sse/ServerSentEventExtensionsTest.kt | 2 +- .../dexpace/sdk/core/instrumentation/LoggingEventTest.kt | 2 +- .../src/test/kotlin/org/dexpace/sdk/core/io/TeeSinkTest.kt | 2 +- .../test/kotlin/org/dexpace/sdk/core/util/FuturesTest.kt | 5 ++--- .../kotlin/org/dexpace/sdk/io/OkioBufferedSourceTest.kt | 2 +- .../dexpace/sdk/transport/jdkhttp/JdkHttpTransportTest.kt | 6 +++--- .../org/dexpace/sdk/transport/okhttp/OkHttpTransportTest.kt | 4 ++-- 13 files changed, 22 insertions(+), 23 deletions(-) diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/auth/DigestChallengeHandlerTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/auth/DigestChallengeHandlerTest.kt index 84b86fc6..58ebdd62 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/auth/DigestChallengeHandlerTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/auth/DigestChallengeHandlerTest.kt @@ -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`() { diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/AsyncInstrumentationStepTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/AsyncInstrumentationStepTest.kt index 99d1dc4f..82ae2cda 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/AsyncInstrumentationStepTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/AsyncInstrumentationStepTest.kt @@ -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() @@ -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) diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/BearerTokenAuthStepTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/BearerTokenAuthStepTest.kt index 8c07139d..033787c6 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/BearerTokenAuthStepTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/BearerTokenAuthStepTest.kt @@ -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 diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/RedirectStepTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/RedirectStepTest.kt index de4260bd..8c59b092 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/RedirectStepTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/RedirectStepTest.kt @@ -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. diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/RetryStepTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/RetryStepTest.kt index 12fd9b1b..cfde286a 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/RetryStepTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/pipeline/steps/RetryStepTest.kt @@ -976,7 +976,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. @@ -1008,7 +1008,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) diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/response/LoggableResponseBodyTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/response/LoggableResponseBodyTest.kt index 18e7b04b..d8ca5818 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/response/LoggableResponseBodyTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/response/LoggableResponseBodyTest.kt @@ -50,7 +50,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`() { @@ -164,7 +164,7 @@ class LoggableResponseBodyTest { ) } - // ----- A12: additional failure-semantics tests ----- + // ----- additional failure-semantics tests ----- @Test fun `source() after drainError is set re-throws the cached exception`() { @@ -269,7 +269,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`() { diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/sse/ServerSentEventExtensionsTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/sse/ServerSentEventExtensionsTest.kt index 2f1d0df0..5dff6e4f 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/sse/ServerSentEventExtensionsTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/http/sse/ServerSentEventExtensionsTest.kt @@ -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`() { diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/instrumentation/LoggingEventTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/instrumentation/LoggingEventTest.kt index e564bc5e..3b4fbb04 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/instrumentation/LoggingEventTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/instrumentation/LoggingEventTest.kt @@ -597,7 +597,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`() { diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/io/TeeSinkTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/io/TeeSinkTest.kt index 81d4142b..73f14faa 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/io/TeeSinkTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/io/TeeSinkTest.kt @@ -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`() { diff --git a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/util/FuturesTest.kt b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/util/FuturesTest.kt index a73e8f86..406fc8dc 100644 --- a/sdk-core/src/test/kotlin/org/dexpace/sdk/core/util/FuturesTest.kt +++ b/sdk-core/src/test/kotlin/org/dexpace/sdk/core/util/FuturesTest.kt @@ -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) } diff --git a/sdk-io-okio3/src/test/kotlin/org/dexpace/sdk/io/OkioBufferedSourceTest.kt b/sdk-io-okio3/src/test/kotlin/org/dexpace/sdk/io/OkioBufferedSourceTest.kt index 1e3e4687..497ae90c 100644 --- a/sdk-io-okio3/src/test/kotlin/org/dexpace/sdk/io/OkioBufferedSourceTest.kt +++ b/sdk-io-okio3/src/test/kotlin/org/dexpace/sdk/io/OkioBufferedSourceTest.kt @@ -232,7 +232,7 @@ class OkioBufferedSourceTest { assertFailsWith { slice.readByte() } } - // ----- close-flag isolation (H6) ----- + // ----- close-flag isolation ----- @Test fun `closing a peek view does not prevent root from closing its delegate`() { diff --git a/sdk-transport-jdkhttp/src/test/kotlin/org/dexpace/sdk/transport/jdkhttp/JdkHttpTransportTest.kt b/sdk-transport-jdkhttp/src/test/kotlin/org/dexpace/sdk/transport/jdkhttp/JdkHttpTransportTest.kt index 42e2e4c6..bdc4c9ec 100644 --- a/sdk-transport-jdkhttp/src/test/kotlin/org/dexpace/sdk/transport/jdkhttp/JdkHttpTransportTest.kt +++ b/sdk-transport-jdkhttp/src/test/kotlin/org/dexpace/sdk/transport/jdkhttp/JdkHttpTransportTest.kt @@ -301,7 +301,7 @@ class JdkHttpTransportTest { } } - // -------- streaming publisher re-subscription (H4) -------- + // -------- streaming publisher re-subscription -------- @Test fun `streamingPublisherSurvivesResubscription`() { @@ -367,7 +367,7 @@ class JdkHttpTransportTest { ) } - // -------- proxy challengeHandler (M7) -------- + // -------- proxy challengeHandler -------- @Test fun `proxyChallengeHandlerIsAcceptedAndSurfacedAsUnsupported`() { @@ -727,7 +727,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, diff --git a/sdk-transport-okhttp/src/test/kotlin/org/dexpace/sdk/transport/okhttp/OkHttpTransportTest.kt b/sdk-transport-okhttp/src/test/kotlin/org/dexpace/sdk/transport/okhttp/OkHttpTransportTest.kt index c466801f..0fc85d43 100644 --- a/sdk-transport-okhttp/src/test/kotlin/org/dexpace/sdk/transport/okhttp/OkHttpTransportTest.kt +++ b/sdk-transport-okhttp/src/test/kotlin/org/dexpace/sdk/transport/okhttp/OkHttpTransportTest.kt @@ -368,7 +368,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 @@ -447,7 +447,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