Port Clojure tests to Java: metrics_test, nimbus_auth_test (Phase 5)#8450
Open
Port Clojure tests to Java: metrics_test, nimbus_auth_test (Phase 5)#8450
Conversation
Port 2 tests from storm-core/test/clj/org/apache/storm/metrics_test.clj to storm-core/test/jvm/org/apache/storm/metric/MetricsIntegrationTest.java: - testCustomMetric: CountMetric with FakeMetricConsumer, simulated time - testCustomMetricWithMultiTasks: same with 2 tasks per bolt Skipped 2 Python multilang metrics tests (require Python shell components) and 1 spout multilang test. Port 5 tests from storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj to storm-server/src/test/java/org/apache/storm/security/auth/NimbusAuthTest.java: - testSimpleAuthentication: SimpleTransportPlugin with no authorizer - testNoopAuthorizationWithSimpleTransport: NoopAuthorizer, mocked cluster state - testDenyAuthorizationWithSimpleTransport: DenyAuthorizer, 17 denied operations - testNoopAuthorizationWithSaslDigest: DigestSaslTransportPlugin with JAAS - testDenyAuthorizationWithSaslDigest: DenyAuthorizer with SASL, 17 denied ops JAAS config file copied to storm-server test resources for classpath access. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
metrics_test.cljand all 5 tests fromnimbus_auth_test.cljto Java/JUnit 5defbolt count-acksreplaced with JavaCountAcksBoltinner classTests ported
MetricsIntegrationTest (storm-core, 2 tests):
testCustomMetrictestCustomMetricWithMultiTasksSkipped: 3 Python multilang metrics tests (require Python shell bolt/spout)
NimbusAuthTest (storm-server, 5 tests):
testSimpleAuthenticationtestNoopAuthorizationWithSimpleTransporttestDenyAuthorizationWithSimpleTransporttestNoopAuthorizationWithSaslDigesttestDenyAuthorizationWithSaslDigestPart of the Clojure test migration effort (Phase 5 of #8445).
Test plan
mvn test -pl storm-core -Dtest=org.apache.storm.metric.MetricsIntegrationTest— 2 tests passmvn test -pl storm-server -Dtest=org.apache.storm.security.auth.NimbusAuthTest— 5 tests pass🤖 Generated with Claude Code