Class ResponsiveTopologyTestDriver

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class ResponsiveTopologyTestDriver
    extends org.apache.kafka.streams.TopologyTestDriver
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String RESPONSIVE_TTD_ID  
    • Constructor Summary

      Constructors 
      Constructor Description
      ResponsiveTopologyTestDriver​(org.apache.kafka.streams.Topology topology)
      Create a new test diver instance with default test properties.
      ResponsiveTopologyTestDriver​(org.apache.kafka.streams.Topology topology, java.time.Instant initialWallClockTimeMs)
      Create a new test diver instance with default test properties.
      ResponsiveTopologyTestDriver​(org.apache.kafka.streams.Topology topology, java.util.Properties config)
      Create a new test diver instance.
      ResponsiveTopologyTestDriver​(org.apache.kafka.streams.Topology topology, java.util.Properties config, java.time.Instant initialWallClockTime)
      Create a new test diver instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void advanceWallClockTime​(java.time.Duration advance)
      Advances the internal mock time used for Responsive-specific features such as ttl, as well as the mock time used for various Kafka Streams functionality such as wall-clock punctuators.
      • Methods inherited from class org.apache.kafka.streams.TopologyTestDriver

        close, createInputTopic, createInputTopic, createOutputTopic, getAllStateStores, getKeyValueStore, getSessionStore, getStateStore, getTimestampedKeyValueStore, getTimestampedWindowStore, getWindowStore, metrics, producedTopicNames
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • RESPONSIVE_TTD_ID

        public static final java.lang.String RESPONSIVE_TTD_ID
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResponsiveTopologyTestDriver

        public ResponsiveTopologyTestDriver​(org.apache.kafka.streams.Topology topology)
        Create a new test diver instance with default test properties.

        Can be used exactly the same as the usual TopologyTestDriver

        Parameters:
        topology - the topology to be tested
      • ResponsiveTopologyTestDriver

        public ResponsiveTopologyTestDriver​(org.apache.kafka.streams.Topology topology,
                                            java.util.Properties config)
        Create a new test diver instance. Initialized the internally mocked wall-clock time with current system time.

        Can be used exactly the same as the usual TopologyTestDriver

        Parameters:
        topology - the topology to be tested
        config - the configuration for the topology
      • ResponsiveTopologyTestDriver

        public ResponsiveTopologyTestDriver​(org.apache.kafka.streams.Topology topology,
                                            java.time.Instant initialWallClockTimeMs)
        Create a new test diver instance with default test properties.

        Can be used exactly the same as the usual TopologyTestDriver

        Parameters:
        topology - the topology to be tested
        initialWallClockTimeMs - the initial value of internally mocked wall-clock time
      • ResponsiveTopologyTestDriver

        public ResponsiveTopologyTestDriver​(org.apache.kafka.streams.Topology topology,
                                            java.util.Properties config,
                                            java.time.Instant initialWallClockTime)
        Create a new test diver instance.

        Can be used exactly the same as the usual TopologyTestDriver

        Parameters:
        topology - the topology to be tested
        config - the configuration for the topology
        initialWallClockTime - the initial value of internally mocked wall-clock time
    • Method Detail

      • advanceWallClockTime

        public void advanceWallClockTime​(java.time.Duration advance)
        Advances the internal mock time used for Responsive-specific features such as ttl, as well as the mock time used for various Kafka Streams functionality such as wall-clock punctuators. See TopologyTestDriver.advanceWallClockTime(Duration) for more details.
        Overrides:
        advanceWallClockTime in class org.apache.kafka.streams.TopologyTestDriver
        Parameters:
        advance - the amount of time to advance wall-clock time