Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
/**
 * Get all the names of all the topics to which records have been output.
 * <p>
 * Call this method after piping the input into the test driver to retrieve the full set of topics the topology
 * produced records to.
 * <p>
 * The returned set of topic names includes changelog, repartition and sink topic names.
 *
 * @return the set of output topic names.
 */
public final Set<String> getOutputTopicNames(){...}

Proposed Changes

Addition ofPhase 1:

Code Block
public final Set<String> getOutputTopicNames() {
    return Collections.unmodifiableSet(outputRecordsByTopic.keySet());
}

Phase 2:

The implementation will be changed such that the key set of outputRecordsByTopic is initialized with all known output, i.e. internal and sink, topic names upon construction of the TopologyTestDriver from the TopologyDescription.  This second phase will mean getOutputTopicNames() will return most topic names even before any input is piped through the topology. Topics that use a non-static TopicNameExtractor will not  be populated on construction.

Compatibility, Deprecation, and Migration Plan

...