refactor(test-harness): replace Groovy/Spock integration tests with Java/JUnit 5#1234
Open
nthmost-orkes wants to merge 6 commits into
Open
refactor(test-harness): replace Groovy/Spock integration tests with Java/JUnit 5#1234nthmost-orkes wants to merge 6 commits into
nthmost-orkes wants to merge 6 commits into
Conversation
- Delete AbstractSpecification.groovy, AbstractResiliencySpecification.groovy, WorkflowTestUtil.groovy and replace with Java equivalents - Delete all 32 Groovy Spock specs (they will be ported incrementally) - Add AbstractSpecification.java: JUnit 5 + Spring Boot Test + Testcontainers - Add WorkflowTestUtil.java: poll/complete/fail helpers now return Task directly instead of Spock Tuple — callers no longer need to destructure [0] - Add SimpleWorkflowTest.java: first ported spec (9 tests) Remaining 31 specs to be converted in follow-up commits on this branch.
Converts all 32 remaining integration and resiliency specs from Groovy/Spock to plain Java + JUnit 5 + AssertJ, completing the full Groovy-to-Java migration started in the previous commit. All 32 test classes compile cleanly; resiliency specs retain @disabled to match the existing @ignore status of the Spock originals.
test-harness no longer has any Groovy source files; drop the groovy plugin and the groovy-all/spock-core/spock-spring/testcontainers-spock dependencies. Also remove test-harness from the root spotless groovy configuration block.
36 tasks
…null value
Four test files had Groovy-syntax string comparisons instead of real map equality
checks (e.g. assertEquals("[key:val]", map.toString()) should be
assertEquals(Map.of("key","val"), map)). Also fixed a Map.of() call with a
null value that throws NPE under Java's immutable Map implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(note: this is a Claude Opus + Sonnet refactor, please scrutinize as such)
Replaces the entire Groovy/Spock test suite in
test-harnesswith plain Java + JUnit 5. All 32 specs are converted; the Groovy compiler plugin and Spock/groovy-all dependencies are removed from the module.AbstractSpecification.javabase class:@SpringBootTest+ static Testcontainers Redis +@DynamicPropertySourceWorkflowTestUtil.java: poll helpers now returnTaskdirectly (not SpockTuple)@Disabled(they were already@Ignorein Spock — interaction-based mock verification requires spy support that isn't available for Redis queue impls)revGroovy/revSpockkept independencies.gradle— still consumed bycore,cassandra-persistence,kafka,redis-concurrency-limit, and othersUser impact: No behavioral change for users. Flaky
ConditionNotSatisfiedfailures from Spock'swith()blocks will be replaced by explicitassertEqualsfailures that name the actual vs expected value. Contributors no longer need a Groovy/Spock mental model to read or write integration tests.Closes #1233