Skip to content

Commit 78cb1c6

Browse files
fryanpanclaude
andcommitted
ADFA-4128: qb 03 review fixes — align tool-path DTO test with contract
Finding (Important, pr03-review.md): DaemonProtocolDtoTest's first test was named "configure without optional toolchain paths means self-discovery" with a comment calling null the "discover from ANDROID_HOME" signal — the opposite of the contract in the same commit (DaemonProtocol.kt KDoc: "required, as the daemon never guesses a tool path"; README: configure answers ok:false with one diagnostic per missing field) and of the daemon's actual behavior at stack tip (DaemonService.configure rejects null/blank aapt2/d8Jar/androidJar). Fix: renamed the test and rewrote the comment so null reads as "not supplied, and configure rejects it", per the documented contract. The assertions were already correct (null IS the DTO default) and are unchanged; the rejection behavior itself is asserted in the daemon module's DaemonServiceTest at stack tip, so no rejection assertion is duplicated here. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kj9YeCDHGp9DU8LPtfWJ7W
1 parent 232fb38 commit 78cb1c6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎quickbuild/protocol/src/test/kotlin/org/appdevforall/cotg/quickbuild/protocol/DaemonProtocolDtoTest.kt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ import org.junit.jupiter.api.Test
1212
*/
1313
class DaemonProtocolDtoTest {
1414
@Test
15-
fun `configure without optional toolchain paths means self-discovery and the v1 minApi floor`() {
15+
fun `configure defaults unsupplied toolchain paths to null - which the daemon rejects - and the v1 minApi floor`() {
1616
val request = ConfigureRequest(1, "/p", listOf("/a.jar"), "/out")
1717

18-
// Null here is the "discover from ANDROID_HOME" signal, not an error.
18+
// Null means "not supplied": the daemon never discovers tool paths, so configure
19+
// answers ok:false with one diagnostic per null/blank path (see the KDoc and README).
1920
assertThat(request.aapt2).isNull()
2021
assertThat(request.d8Jar).isNull()
2122
assertThat(request.androidJar).isNull()

0 commit comments

Comments
 (0)