Port Clojure tests to Java and remove Clojure dependency
Background
Apache Storm was originally written in Clojure. Over the years the core was rewritten
in Java, but ~5,000 lines of Clojure integration tests remain in storm-core/test/clj/
(107 test functions across 13 files). These tests are the main reason the project still
carries a Clojure build dependency (Clojure 1.12.4, carbonite, tools.logging,
clojure-maven-plugin, and a custom Maven shade transformer).
The Java testing infrastructure is already mature — Testing.java provides 33 public
utility methods, and JUnit 5, Mockito, and Awaitility are all available. 48 Java test
files already exist under storm-server/src/test/.
Goal
Port all Clojure test functions to Java/JUnit 5, then remove the storm-clojure,
storm-clojure-test modules and all Clojure build infrastructure. This eliminates a
language dependency, simplifies the build, and makes the test suite accessible to all
Java contributors.
Plan
Each phase produces a self-contained PR. Clojure files are not deleted until the
final cleanup phase, so both test suites coexist during the migration.
| Phase |
Clojure files |
Tests |
Status |
| 1 |
serialization_test.clj, versioned_store_test.clj, trident/tuple_test.clj |
8 |
Merged in #8443 |
| 2 |
scheduler_test.clj, multitenant_scheduler_test.clj |
21 |
Merged in #8444 |
| 3 |
cluster_test.clj |
10 |
Merged in #8446 |
| 4 |
drpc_test.clj, grouping_test.clj |
11 |
Merged in #8449 |
| 5 |
metrics_test.clj, security/auth/nimbus_auth_test.clj |
9 |
Merged in #8450 |
| 6 |
trident/integration_test.clj |
9 |
Merged in #8451 |
| 7 |
nimbus_test.clj |
40 |
Merged in #8453 |
| 8 |
Delete all Clojure test/build infrastructure |
— |
Planned |
Phase 8 cleanup (final PR)
- Delete
storm-core/test/clj/ entirely
- Delete
storm-clojure/ and storm-clojure-test/ modules
- Delete
storm-buildtools/maven-shade-clojure-transformer/
- Delete
storm-starter/src/clj/ examples
- Remove
clojure-maven-plugin from storm-core/pom.xml
- Remove Clojure
<module> entries and dependency properties from root pom.xml
Port Clojure tests to Java and remove Clojure dependency
Background
Apache Storm was originally written in Clojure. Over the years the core was rewritten
in Java, but ~5,000 lines of Clojure integration tests remain in
storm-core/test/clj/(107 test functions across 13 files). These tests are the main reason the project still
carries a Clojure build dependency (Clojure 1.12.4, carbonite, tools.logging,
clojure-maven-plugin, and a custom Maven shade transformer).
The Java testing infrastructure is already mature —
Testing.javaprovides 33 publicutility methods, and JUnit 5, Mockito, and Awaitility are all available. 48 Java test
files already exist under
storm-server/src/test/.Goal
Port all Clojure test functions to Java/JUnit 5, then remove the
storm-clojure,storm-clojure-testmodules and all Clojure build infrastructure. This eliminates alanguage dependency, simplifies the build, and makes the test suite accessible to all
Java contributors.
Plan
Each phase produces a self-contained PR. Clojure files are not deleted until the
final cleanup phase, so both test suites coexist during the migration.
serialization_test.clj,versioned_store_test.clj,trident/tuple_test.cljscheduler_test.clj,multitenant_scheduler_test.cljcluster_test.cljdrpc_test.clj,grouping_test.cljmetrics_test.clj,security/auth/nimbus_auth_test.cljtrident/integration_test.cljnimbus_test.cljPhase 8 cleanup (final PR)
storm-core/test/clj/entirelystorm-clojure/andstorm-clojure-test/modulesstorm-buildtools/maven-shade-clojure-transformer/storm-starter/src/clj/examplesclojure-maven-pluginfromstorm-core/pom.xml<module>entries and dependency properties from rootpom.xml