Package org.apache.kafka.streams.test
Class OutputVerifier
- java.lang.Object
-
- org.apache.kafka.streams.test.OutputVerifier
-
@Deprecated public class OutputVerifier extends Object
Deprecated.Since 2.4 use methods ofTestOutputTopic
and standard assertion libraries insteadHelper class to verify topology result records.- See Also:
TopologyTestDriver
-
-
Constructor Summary
Constructors Constructor Description OutputVerifier()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <K,V>
voidcompareKeyValue(ProducerRecord<K,V> record, K expectedKey, V expectedValue)
Deprecated.Compares aProducerRecord
with the provided key and value and throws anAssertionError
if theProducerRecord
's key or value is not equal to the expected key or value.static <K,V>
voidcompareKeyValue(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord)
Deprecated.Compares the keys and values of twoProducerRecord
's and throws anAssertionError
if the keys or values are not equal to each other.static <K,V>
voidcompareKeyValueHeaders(ProducerRecord<K,V> record, K expectedKey, V expectedValue, Headers expectedHeaders)
Deprecated.Compares aProducerRecord
with the provided key, value, and headers and throws anAssertionError
if theProducerRecord
's key, value, or headers is not equal to the expected key, value, or headers.static <K,V>
voidcompareKeyValueHeaders(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord)
Deprecated.Compares the keys, values, and headers of twoProducerRecord
's and throws anAssertionError
if the keys, values, or headers are not equal to each other.static <K,V>
voidcompareKeyValueHeadersTimestamp(ProducerRecord<K,V> record, K expectedKey, V expectedValue, Headers expectedHeaders, long expectedTimestamp)
Deprecated.Compares aProducerRecord
with the provided key, value, headers, and timestamp and throws anAssertionError
if theProducerRecord
's key, value, headers, or timestamp is not equal to the expected key, value, headers, or timestamp.static <K,V>
voidcompareKeyValueHeadersTimestamp(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord)
Deprecated.Compares the keys, values, headers, and timestamp of twoProducerRecord
's and throws anAssertionError
if the keys, values, headers, or timestamps are not equal to each other.static <K,V>
voidcompareKeyValueTimestamp(ProducerRecord<K,V> record, K expectedKey, V expectedValue, long expectedTimestamp)
Deprecated.Compares aProducerRecord
with the provided key, value, and timestamp and throws anAssertionError
if theProducerRecord
's key, value, or timestamp is not equal to the expected key, value, or timestamp.static <K,V>
voidcompareKeyValueTimestamp(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord)
Deprecated.Compares the keys, values, and timestamps of twoProducerRecord
's and throws anAssertionError
if the keys, values, or timestamps are not equal to each other.static <K,V>
voidcompareValue(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord)
Deprecated.Compares the values of twoProducerRecord
's and throws anAssertionError
if they are not equal to each other.static <K,V>
voidcompareValue(ProducerRecord<K,V> record, V expectedValue)
Deprecated.Compares aProducerRecord
with the provided value and throws anAssertionError
if theProducerRecord
's value is not equal to the expected value.static <K,V>
voidcompareValueHeaders(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord)
Deprecated.Compares the values and headers of twoProducerRecord
's and throws anAssertionError
if the values or headers are not equal to each other.static <K,V>
voidcompareValueHeaders(ProducerRecord<K,V> record, V expectedValue, Headers expectedHeaders)
Deprecated.Compares aProducerRecord
with the provided value and headers and throws anAssertionError
if theProducerRecord
's value or headers is not equal to the expected value or headers.static <K,V>
voidcompareValueTimestamp(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord)
Deprecated.Compares the values and timestamps of twoProducerRecord
's and throws anAssertionError
if the values or timestamps are not equal to each other.static <K,V>
voidcompareValueTimestamp(ProducerRecord<K,V> record, V expectedValue, long expectedTimestamp)
Deprecated.Compares aProducerRecord
with the provided value and timestamp and throws anAssertionError
if theProducerRecord
's value or timestamp is not equal to the expected value or timestamp.
-
-
-
Method Detail
-
compareValue
public static <K,V> void compareValue(ProducerRecord<K,V> record, V expectedValue) throws AssertionError
Deprecated.Compares aProducerRecord
with the provided value and throws anAssertionError
if theProducerRecord
's value is not equal to the expected value.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedValue
- the expected value of theProducerRecord
- Throws:
AssertionError
- ifProducerRecord
's value is not equal toexpectedValue
-
compareValue
public static <K,V> void compareValue(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
Deprecated.Compares the values of twoProducerRecord
's and throws anAssertionError
if they are not equal to each other.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedRecord
- aProducerRecord
for verification- Throws:
AssertionError
- ifProducerRecord
's value is not equal toexpectedRecord
's value
-
compareKeyValue
public static <K,V> void compareKeyValue(ProducerRecord<K,V> record, K expectedKey, V expectedValue) throws AssertionError
Deprecated.Compares aProducerRecord
with the provided key and value and throws anAssertionError
if theProducerRecord
's key or value is not equal to the expected key or value.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedKey
- the expected key of theProducerRecord
expectedValue
- the expected value of theProducerRecord
- Throws:
AssertionError
- ifProducerRecord
's key or value is not equal toexpectedKey
orexpectedValue
-
compareKeyValue
public static <K,V> void compareKeyValue(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
Deprecated.Compares the keys and values of twoProducerRecord
's and throws anAssertionError
if the keys or values are not equal to each other.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedRecord
- aProducerRecord
for verification- Throws:
AssertionError
- ifProducerRecord
's key or value is not equal toexpectedRecord
's key or value
-
compareValueTimestamp
public static <K,V> void compareValueTimestamp(ProducerRecord<K,V> record, V expectedValue, long expectedTimestamp) throws AssertionError
Deprecated.Compares aProducerRecord
with the provided value and timestamp and throws anAssertionError
if theProducerRecord
's value or timestamp is not equal to the expected value or timestamp.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedValue
- the expected value of theProducerRecord
expectedTimestamp
- the expected timestamps of theProducerRecord
- Throws:
AssertionError
- ifProducerRecord
's value or timestamp is not equal toexpectedValue
orexpectedTimestamp
-
compareValueTimestamp
public static <K,V> void compareValueTimestamp(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
Deprecated.Compares the values and timestamps of twoProducerRecord
's and throws anAssertionError
if the values or timestamps are not equal to each other.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedRecord
- aProducerRecord
for verification- Throws:
AssertionError
- ifProducerRecord
's value or timestamp is not equal toexpectedRecord
's value or timestamp
-
compareKeyValueTimestamp
public static <K,V> void compareKeyValueTimestamp(ProducerRecord<K,V> record, K expectedKey, V expectedValue, long expectedTimestamp) throws AssertionError
Deprecated.Compares aProducerRecord
with the provided key, value, and timestamp and throws anAssertionError
if theProducerRecord
's key, value, or timestamp is not equal to the expected key, value, or timestamp.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedKey
- the expected key of theProducerRecord
expectedValue
- the expected value of theProducerRecord
expectedTimestamp
- the expected timestamp of theProducerRecord
- Throws:
AssertionError
- ifProducerRecord
's key, value, timestamp is not equal toexpectedKey
,expectedValue
, orexpectedTimestamps
-
compareKeyValueTimestamp
public static <K,V> void compareKeyValueTimestamp(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
Deprecated.Compares the keys, values, and timestamps of twoProducerRecord
's and throws anAssertionError
if the keys, values, or timestamps are not equal to each other.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedRecord
- aProducerRecord
for verification- Throws:
AssertionError
- ifProducerRecord
's key, value, or timestamp is not equal toexpectedRecord
's key, value, or timestamp
-
compareValueHeaders
public static <K,V> void compareValueHeaders(ProducerRecord<K,V> record, V expectedValue, Headers expectedHeaders) throws AssertionError
Deprecated.Compares aProducerRecord
with the provided value and headers and throws anAssertionError
if theProducerRecord
's value or headers is not equal to the expected value or headers.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedValue
- the expected value of theProducerRecord
expectedHeaders
- the expected headers of theProducerRecord
- Throws:
AssertionError
- ifProducerRecord
's value or headers is not equal toexpectedValue
orexpectedHeaders
-
compareValueHeaders
public static <K,V> void compareValueHeaders(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
Deprecated.Compares the values and headers of twoProducerRecord
's and throws anAssertionError
if the values or headers are not equal to each other.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedRecord
- aProducerRecord
for verification- Throws:
AssertionError
- ifProducerRecord
's value or headers is not equal toexpectedRecord
's value or headers
-
compareKeyValueHeaders
public static <K,V> void compareKeyValueHeaders(ProducerRecord<K,V> record, K expectedKey, V expectedValue, Headers expectedHeaders) throws AssertionError
Deprecated.Compares aProducerRecord
with the provided key, value, and headers and throws anAssertionError
if theProducerRecord
's key, value, or headers is not equal to the expected key, value, or headers.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedKey
- the expected key of theProducerRecord
expectedValue
- the expected value of theProducerRecord
expectedHeaders
- the expected headers of theProducerRecord
- Throws:
AssertionError
- ifProducerRecord
's key, value, headers is not equal toexpectedKey
,expectedValue
, orexpectedHeaders
-
compareKeyValueHeaders
public static <K,V> void compareKeyValueHeaders(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
Deprecated.Compares the keys, values, and headers of twoProducerRecord
's and throws anAssertionError
if the keys, values, or headers are not equal to each other.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedRecord
- aProducerRecord
for verification- Throws:
AssertionError
- ifProducerRecord
's key, value, or headers is not equal toexpectedRecord
's key, value, or headers
-
compareKeyValueHeadersTimestamp
public static <K,V> void compareKeyValueHeadersTimestamp(ProducerRecord<K,V> record, K expectedKey, V expectedValue, Headers expectedHeaders, long expectedTimestamp) throws AssertionError
Deprecated.Compares aProducerRecord
with the provided key, value, headers, and timestamp and throws anAssertionError
if theProducerRecord
's key, value, headers, or timestamp is not equal to the expected key, value, headers, or timestamp.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedKey
- the expected key of theProducerRecord
expectedValue
- the expected value of theProducerRecord
expectedHeaders
- the expected headers of theProducerRecord
expectedTimestamp
- the expected timestamp of theProducerRecord
- Throws:
AssertionError
- ifProducerRecord
's key, value, headers is not equal toexpectedKey
,expectedValue
, orexpectedHeaders
-
compareKeyValueHeadersTimestamp
public static <K,V> void compareKeyValueHeadersTimestamp(ProducerRecord<K,V> record, ProducerRecord<K,V> expectedRecord) throws AssertionError
Deprecated.Compares the keys, values, headers, and timestamp of twoProducerRecord
's and throws anAssertionError
if the keys, values, headers, or timestamps are not equal to each other.- Type Parameters:
K
- the key typeV
- the value type- Parameters:
record
- a outputProducerRecord
for verificationexpectedRecord
- aProducerRecord
for verification- Throws:
AssertionError
- ifProducerRecord
's key, value, headers, or timestamp is not equal toexpectedRecord
's key, value, headers, or timestamp
-
-