All Classes and Interfaces

Class
Description
 
 
 
 
 
 
Validates the sendResponse path when no Netty writes occur in the current iteration and lastWriteFuture() returns a completed future.
 
 
 
 
A set of common utilities and tests for the ProxyProtocolV1Engine and ProxyProtocolV2Engine.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Simple utility for setting up a mock KafkaAdminClient that uses a MockClient for a supplied Cluster.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Tests for BouncyCastle FIPS approved-only mode.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Tests for the bounded-request size cap in ByteBufReceive: oversized requests on configured api keys are rejected after the 4-byte api header is read, before the (potentially large) payload is retained into the composite buffer.
Test class to test ByteBufReceive backing multiple buffers.
Test class to test ByteBufReceive backed by a single buffer.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Tests for FIPS validation of OAuth endpoints used by the client.
 
 
 
 
 
 
 
 
 
This resolver provides an instance of ClusterInstance to a test invocation.
 
 
 
 
 
 
 
This class is a custom JUnit extension that will generate some number of test invocations depending on the processing of a few custom annotations.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Tests for the control message wire format: ByteBufReceive's negative-size handling, ControlMessage's zero-copy composite buffer construction, and the versioned capability handshake on K2PStreamMetadata (edge → broker) and BrokerToEdgeMetadata (broker → edge).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
This class is an Oauth callback handler with artificially added delay in the handling.
 
Used by MockSelector to allow clients to add responses whose associated requests are added later.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Simple test class to validate DirectSendTransport.DirectSend methods.
 
A dummy implementation of LicenseManagerService for use with integration tests.
A dummy implementation of LicenseValidator for use with integration tests.
 
 
 
 
 
 
 
Echo stream handler is same for all type of transports, so it has a package scope so that other Netty servers can use it.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
A single fault to apply to responses of one ApiKeys.
 
 
 
This tests the FetchBuffer functionality in addition to what FetcherTest covers in its tests.
This tests the FetchCollector functionality in addition to what FetcherTest tests during the course of its tests.
 
If you are adding a test here, do evaluate if a similar test needs to be added in FetchRequestManagerTest.java, which captures the tests for the new consumer as part of the https://cwiki.apache.org/confluence/display/KAFKA/Consumer+threading+refactor+project+overview
 
 
 
A unit test for FetchSessionHandler.
 
 
SCRAM validation callback handler for brokers that stores credentials in a file instead of ZooKeeper.
 
 
 
 
 
Test to verify FIPS cipher suites against actual security providers.
 
 
 
 
 
 
 
GlobalLeakedThreads is a utility class that manages a global set of leaked thread IDs.
 
 
 
 
 
 
 
 
 
 
Enumeration of HTTP/2 modes for testing purposes.
 
 
A unit test for ImplicitLinkedHashCollection.
A unit test for ImplicitLinkedHashMultiCollection.
 
 
 
 
 
 
 
 
 
 
Unit tests for IssuerAgnosticKeyManager.
Tests parsing of SaslConfigs.SASL_JAAS_CONFIG property and verifies that the format and parsing are consistent with JAAS configuration files loaded by the JRE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Shared scaffolding for KafkaAdminClient unit tests.
 
 
 
 
 
 
Note to future authors in this class.
 
 
 
 
 
A wrapper class for KafkaChannel that implements NioEchoChannel.
A unit test for KafkaFuture.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
A lightweight, client-agnostic Kafka wire-protocol fault-injection proxy for fast integration tests.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
A mock network client for use testing code
 
This is a dumbed down version of MetadataUpdater which is used to facilitate metadata tracking primarily in order to serve KafkaClient.leastLoadedNode(long) and bookkeeping through Metadata.
The RequestMatcher provides a way to match a particular request to a response prepared through MockClient.prepareResponse(RequestMatcher, AbstractResponse).
 
 
 
 
 
 
This is a fault handler suitable for use in JUnit tests.
 
 
 
 
 
 
 
A fake selector to use for testing
 
 
A clock that you can manually advance by calling sleep
 
 
 
 
 
Test class for HTTP/2 handler initializer sets up the handlers as expected.
 
 
 
 
HTTP/2 echo server to test the HTTP/2 client implementation.
A simple HTTP/2 server that reverses the connected streams.
Test for HTTP/2 reverse streams using Netty
Test class to test methods in the NettyHttp2Selector.StreamChannel class.
Test class to verify that NettyHttp2Selector can be used to create Kafka clients.
 
Test class to test the only netty handler we have in the stream channel.
Integration-style test that creates a real HTTP/2 stream over an EmbeddedChannel and validates the streamId before and after sending HTTP/2 headers.
Test class for HTTP/2 connection methods.
 
A Netty implementation of the NioEchoChannel interface that provides methods to access channel ID, principal, readiness state, authentication context, public credential, and the underlying channel object.
 
Analogous to the NioEchoServer but implemented using Netty.
 
 
 
Tests that
invalid reference
NettySslEngineFactory.IssuerAgnosticKeyManager
presents the client certificate regardless of the server's acceptable CA list in the TLS CertificateRequest.
 
 
Test class to make sure that the stream events are delivered correctly to the NettyStream.StreamHandler handler that was passed in to the NettyHttp2Stream class.
 
 
 
Common utility functions used by transport layer and authenticator tests.
 
Represents a channel in the NIO echo server that can be used for testing purposes.
Non-blocking EchoServer implementation that uses ChannelBuilder to create channels with the configured security protocol.
 
 
 
 
This class can be used in the callback given to TestUtils.retryOnExceptionWithTimeout(long, long, ValuelessCallable) to indicate that a particular exception should not be retried.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Stand-in for a custom operator-supplied JwtValidator, used to verify that the startup configuration check does not apply when a non-default validator class is set.
 
This test case ensures OffsetAndMetadata class is serializable and is serialization compatible.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test helper class that will connect to a given server address, write out the given payload and disconnect
 
 
 
 
Tests for the PreparedTxnState class part of the #KafkaProducer class.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
A set of tests for the ProxyProtocolCombinedEngine.
Tests the ProxyProtocolCombinedEngine using the v1 engine as the active engine.
A set of tests for the ProxyProtocolV1Engine.
Tests the ProxyProtocolCombinedEngine using the v2 engine as the active engine.
 
 
 
 
 
 
Wraps a KafkaClusterTestKit inside lifecycle methods for a test invocation.
 
 
 
 
 
Test class to test ReadableByteBuf backing multiple buffers.
Test class to test ReadableByteBuf backing multiple buffers with data split across them.
Test class to test ReadableByteBuf backing only a single buffer.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
A simple StreamHandler that reverses the connected streams.
 
 
A registry of predefined Metrics for the MetricsTest.java class.
 
 
 
 
Uses real, BouncyCastle-signed X.509 certificates (via TestSslUtils) rather than mocks, so these tests exercise the actual ASN.1 SAN extension encoding/decoding that X509Certificate.getSubjectAlternativeNames() performs, not just a canned mock return value.
 
 
 
 
Tests for the Sasl authenticator.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Test class to validate methods in SaslNettyTransport class.
 
Principal builder that simulates a non-CRL mTLS failure by throwing a generic AuthenticationException.
Principal builder that simulates a CRL check failure by throwing CertificateRevokedException.
Records the most-recently-pushed TenantConfigSource for the forwarding test below.
Test class to validate methods in SaslSocketServerTransport class.
 
 
 
 
 
This is a class meant to stand-in for the AccessController, and Subject classes.
This class stands-in for the AccessControlContext in the mocked signatures below, because we can't have a compile-time dependency on the real class.
 
Tests for the Selector's handling of InvalidReceiveException thrown when a peer sends an oversized request.
A set of tests for the selector.
 
 
 
 
 
 
 
 
 
 
 
This tests the ShareFetchBuffer functionality.
This tests the ShareFetchCollector functionality.
This tests the ShareFetch functionality.
 
 
A unit test for ShareSessionHandler.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Unit tests for SpireClientFactory.
 
 
 
A set of tests for the selector.
 
Tests for the SSL transport layer.
 
 
Tests for the SSL transport layer.
 
 
 
 
 
 
 
 
 
 
 
Unit tests for the SupportedVersionRange class.
 
Property-based tests for the tagged-field guards in the generated read() path (see
invalid reference
MessageDataGeneratorTest
for the code-generation-level assertions and MessageTest for the example-based cases).
 
 
 
 
 
 
Interface to wrap actions that are required to wait until a condition is met for testing purposes.
 
Digest-MD5 login module for multi-mechanism tests.
 
 
An implementation of Http2StreamChannel for testing that provides the same functionality as EmbeddedChannel but also allows for custom HTTP/2 stream behaviours.
 
 
 
 
 
 
 
A simple Netty client for testing purposes.
A plugin for creating a TestNettyHttp2Selector that can handle HTTP/2 streams.
Test implementation of NettyHttp2Selector that overrides the stream creation headers to include a custom tenant ID and client information.
Listener to process the data received from the server.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Helper functions for writing unit tests.
Helper functions for writing unit tests
 
ThreadLeakListener is a TestExecutionListener that checks for thread leaks after test execution.
 
A mock assignor which throws for ConsumerPartitionAssignor.onAssignment(ConsumerPartitionAssignor.Assignment, ConsumerGroupMetadata).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
This test ensures TopicPartition class is serializable and is serialization compatible.
 
 
 
 
Same with RequestContext but allows passing in a custom response transforming function.
 
 
 
 
 
 
 
 
 
 
 
Test class to test methods in Utils class.
 
 
Like a Runnable that allows exceptions to be thrown or a Callable that does not return a value.